You choose the target of the second ability as it attacks. The number of time counters is checked at the time the ability resolves. If The War Doctor has left the battlefield by that time, use the number of time counters it had on it the last time it was on the battlefield to determine how much damage it deals to that target.