i assume you mean theexpectednumber of visits.

If the process is in any given state at time 2, you can use your formula to get a conditional expectation. So just find the probability that the process is in each state at time 2, multiply by the conditional expectation, and sum up over all possible states.