TITLE: Number of prime order elements of two non-isomorphic groups of same order
QUESTION [9 upvotes]: For a given finite group $G$, let $\pi (G)$ denote the set of all prime divisors of $\vert G\vert$.
Let $G_1$, $G_2$ be non-isomorphic finite  groups of same order. Then obviously $\pi(G_1)=\pi(G_2)$.
Suppose $G_1$, $G_2$ have the same number of elements of each non-prime order.
Then is it true that  $G_1$, $G_2$ have the same number of elements of order $p$, for each $p \in \pi(G_1)$ ?
I guess that it is true; but I couldn't prove it.
Can any one give an example for which this is not true ?

REPLY [3 votes]: There are no examples up to order $700$, by a quick search in Magma.
There are also no examples with only elements of prime order (or $1$). This follows from a result from a paper of Deaconescu et al, which classifies such finite groups. They are one of the following:

A $p$-group of exponent $p$;
The alternating group $A_5$;
A Frobenius group $P\rtimes C_q$ for some $p$-group $P$ of exponent $p$ and some prime $q\neq p$.

In all three cases the number of elements of each order can be deduced purely from the group order, and of course there is no overlap of orders between the three categories.
The general problem seems difficult.