Number of subgroup of order $p^2$ in $\mathbb{Z}_{p^{2}} \times \mathbb{Z}_{p^{2}}$ 
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$).
 A: 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*}$$
A: I suppose $p$ is prime.
An element in $G = \mathbb{Z}_{p^{2}} \times \mathbb{Z}_{p^{2}}$ is of the form $$g = a^xb^y \ \ \ \ \ x, y \in \lbrace 0,1, \ldots p^2 -1 \rbrace$$  where $a$ is a generator of the first $\mathbb{Z}_{p^{2}}$ and $b$ of the second.
We have $ab = ba$ and so the order of $a^xb^y$ is $\text{lcm}(x,y) $. This implies that the number of elements in $G$ with order $p^2$ is $$N = (p^2 - p) ( p^2 +p) $$ Infact $\text{ord}(a^xb^y) = p^2$ if and only if the order of $a^x$ or $b^y$ is $p^2$.
So if $\phi$ is the Euler function then $\phi(p^2) = p^2 -p $ and the elements in $G$ with order $p^2$ are $$2 \cdot p^2(p^2-p) -(p^2 -p )^2 = (p^2 - p) ( p^2 +p) $$  Every such element generates a subgroup $\mathbb{Z}_{p^{2}}$, and every such subgroup contains $\phi(p^2) = p^2 -p $ elements of order $p^2$. 
Thus the number of subgroups of $G$ isomorphic to $\mathbb{Z}_{p^2}$ is $$\frac{(p^2 - p) ( p^2 +p)}{p^2 - p} = p^2 + p$$
