Proof (state is either recurrent or transient)
Let $f_i = \prob(T_i < \infty | X_0 = i)$.
If $f_i = 1$, then from the probabilities for the number of visits, $$ \begin{align*} \prob(V_i > r|X_0 = i) = 1 \text{ for all } r &\implies \prob(V_i = \infty | X_0 = i) = 1 \\ &\implies \prob(X_n = i \text{ for infinitely many } i) = 1 \end{align*} $$ so $i$ is recurrent. Also $$ \begin{align*} \sum_{n=0}^{\infty} p_{ii}(n) ={}& \sum_{n=0}^\infty \expect\big(\mathbb{1}(X_n = i)\big| X_0 = i\big) \\ ={}& \expect\left(\sum_{n=0}^{\infty} \mathbb{1}(X_n=i)\Big|X_0 = i\right) \\ ={}& \expect(V_i|X_0 = i) \\ ={}& \infty. \end{align*} $$
If $f_i < 1$ instead, then conditioned on $X_0=0$, $V_i$ is geometrically distributed with mean $1/(1-f_i)$. Hence $\prob(V_i < \infty | X_0 = 0) = 1$ and $\sum_{n=0}^{\infty} p_{ii}(n) = \expect(V_i|X_0 = i)$.