Let $G, G'$ be two finite Abelian groups of equal order. Let $n_d(G)$ denote the number of elements of order $d$ where $d$ is a divisor of $|G|$. Note that, $n_d(G)\geqslant 0$ since for example, $n_4(\mathbb{Z}_2\times \mathbb{Z}_2)=0$ and $n_4(\mathbb{Z}_4\times \mathbb{Z}_2)=4$.
If $G\simeq G'$ then $n_d(G)=n_d(G')$ for every positive divisor $d$ of $|G|$ and vice-versa. I found a proof in this paper: "Ronald McHaffey (1965). Isomorphism of Finite Abelian Groups. The American Mathematical Monthly, 72(1), 48–50. doi:10.2307/2313001 ".
However a question raised in my mind. Suppose we do not know if $G\simeq G'$ but for some particular positive divisor $d>1$ of $|G|$, let $n_d(G)=n_d(G')$. My question is, does this imply $n_d(G)=n_d(G')$ for all positive divisors $d$ of $|G|$ ? If this is true, then eventually $G$ and $G'$ become isomorphic by the above theorem.
I could not find any counter-example, neither I was able to establish this proof. Can anyone help me in this regard ? If any work is done earlier, share the link plz if there be any.
Trivial case: In fact any group has a unique element of order $1$, i.e., $\Bbb{Z}_4$ and $K_4$ has same number of element of order $1$.
Consider $\Bbb{Z}_2\times\Bbb{Z}_6$ and $\Bbb{Z}_{12}$.
The order $3$ elements:
In $\Bbb{Z}_2\times\Bbb{Z}_6$: $(0,2), (0,4) $.
In $\Bbb{Z_{12}}$: $4, 8$.
Then both group have same number of elements of order $3$.
But $n_2(\Bbb{Z}_2×\Bbb{Z}_6)= 3$ and $n_2(\Bbb{Z}_{12})=\varphi(2) =1$.