Let $p$ be a prime. I want to find the number of subgroups of the group $$G=\mathbb{Z}/p\mathbb{Z}\oplus\mathbb{Z}/p\mathbb{Z}$$.
My idea:
(1) The main problem is to find subgroups of order $p$. Any subgroup of order $p$ is of the form $$H=\langle(a,b)\rangle$$ where one of $a$ or $b$ is nonzero.
(2) For $0\leq i\leq p-1$, define the subgroup $$H_i=\langle(1,i)\rangle.$$ Define the subgroup $$K=\langle (0,1)\rangle.$$ Then the subgroups $K, H_0,\dots, H_{p-1}$ are distinct subgroups of order $p$.
(3) We claim that $$G=\left(\bigcup_{i=0}^{p-1}H_i\right)\bigcup K.$$ This follows from calculating the cardinality of the union. The subgroups $K, H_0,\dots, H_{p-1}$ are distinct subgroups of order $p$. Any two distinct subgroups of order $p$ intersect only at $(0,0)$. There are $p+1$ subgroups in the union and each of them contains $p-1$ nontrivial elements. So the cardinality of the union is $$\left|\left(\bigcup_{i=0}^{p-1}H_i\right)\bigcup K\right|=(p+1)(p-1)+1=p^2=|G|$$
(4) Since $$G=\left(\bigcup_{i=0}^{p-1}H_i\right)\bigcup K$$ if $\langle(a,b)\rangle$ is any subgroup of order $p$, then $\langle(a,b)\rangle$ is already considered in the union. Therefore $K, H_0,\dots, H_{p-1}$ are precisely all the distinct subgroups of order $p$.
(5) So the total number of subgroups of order $p$ is $p+1$. Hence the total number of subgroups is $p+3$.
Is my calculation correct? What are the other methods to solve this problem?