I am looking for a method to calculate number all subgroups of a finite elementary abelian $p$-group.
Suppose $G$ be an elementary abelian $p$-group of order $p^n$. A proper subgroup $H$ of $G$ is also an elementary abelian $p$-group of order $p^r$ where $r<n$.
We can realize $G$ as $n$ dimensional vector over $\mathbb Z_p$ and number of subgroups of $G$ of order $p^r$ is equal to the number of $r$ dimensional subspaces of the vector space.
Now we have to count the number of linearly independent $r$-tuples of vectors but several tuples may give same subspace.
Now what should I do??