Let $G = \mathbb{Z}_{p^{2}} \times \mathbb{Z}_{p^{2}}$. How many subgroups does $G$ has of order $p^2$?
I know there are only 2 cases of the subgroup H, H can be isomorphic to $Z_{p^{2}}$ or
$ Z_{p} \times Z_{p} $
For the second case, only 1 subgroup satisfy the requirement, and I don't know how to count the first case(the result should be $p^2 + p$).
Let $M$ denote the number of cyclic subgroups of $\mathbb{Z}_{p^2} \times \mathbb{Z}_{p^2}$ of order $p^2$. If I'm understanding correctly, it seems that you're really only asking why $M = p^2 + p$.
First, you need to be aware that:
1) If $G_1, G_2$ are groups then $(a,b) \in G_1 \times G_2$ has order lcm$(|a|, |b|)$.
2) A cyclic group of order $p^2$ will have $\varphi(p^2) = p^2 - p$ generators ($\varphi$ is Euler's totient function).
Knowing these two facts (neither is difficult to prove), it becomes apparent that
$$M = \frac{\#(\text{elements in } \mathbb{Z}_{p^2} \times \mathbb{Z}_{p^2} \text{ of order } p^2)}{\varphi(p^2)}$$
Now, again by (1), we know that $(a,b) \in \mathbb{Z}_{p^2} \times \mathbb{Z}_{p^2}$ will have order $p^2$ if and only if both $|a|, |b| \in \{1,p,p^2\}$ and at least one of $a$ or $b$ has order $p^2$. There are exactly $$\varphi(p^2)^2 + 2\varphi(p^2)\varphi(p) + 2\varphi(p^2) \varphi(1)$$ elements $(a,b)$ that satisfy these criteria, and so it follows that
$$\begin{align*}M =&\; \varphi(p^2) + 2\varphi(p) + 2\varphi(1) \\ =&\; p^2 - p + 2(p-1) + 2 \\ =&\; p^2 + p\\ \end{align*}$$