Yemon Choi is right to say that for rank two groups this is essentially an exercise. However, a somewhat indirect (and possibly more difficult) approach seems to be instructive here:
Suppose $P$ is a finite abelian $p$-group. Let $P[p] = \{ x\in P \mid px = 0\}$. Then every automorphism $g$ of $P$ restricts to an automorphism $\bar g$ of $P[p]$. Define the height $h(x)$ of $x\in P$ as the largest integer $h$ such that $x = p^h y$ for some $y\in P$. The automorphism $\bar g$ is clearly height preserving. It turns out that every height-preserving automorphism of $P[p]$ extends to an automorphism of $P$ (see I. Kaplansky, Infinite Abelian Groups, Academic Press, New York, 1970., page 30). Thus we have an exact sequence:
$$
1 \to N \to \mathrm{Aut}(P) \to \mathrm{Aut}_h(P[p]) \to 1,
$$
where $\mathrm{Aut}_h(P[p])$ denotes the group of height-preserving automorphisms of $P[p]$. Furthermore, $N$ is a $p$-group. Thus your question for general abelian $p$-groups actually becomes a question about the cardinality of a subgroup of $GL(n,p)$ which preserves a flag of subspaces, namely the flag whose subspaces are elements of height greater than or equal to a given integer (a parabolic subgroup).