Divisor of a finite group 
Suppose we have a finite group $G$ and $d\in \mathbb N$ is a divisor of $|G|$. We define the set $E_d= \{g\in G : g^d =1\}$. Prove that $d$ is also a divisor of $|E_d|$.

So far I proved that $E_d=\displaystyle \bigcup_{g\in G : o(g)\vert d} \langle g \rangle$ but I didn't know how to continue from here and if this equality is helpful or not. 
I will appreciate any help. Thank you.
 A: Consider the set of $d$-tuples 
\begin{eqnarray} S=\{(g_1, \cdots, g_d)|g_1g_2\cdots g_d=e, g_1, g_2, \cdots, g_d\text{ are not periodic with periodicity}>1\text{ and }<d\}\end{eqnarray}
Note that $|S|$ is divisible by $d$. Consider the $\mathbb{Z}_d$-action on $S$ by cyclically permuting the entries in a tuple, i.e. the generator $1\in\mathbb{Z}_d$ takes $(g_1, g_2, \cdots, g_d)$ to $(g_2, g_3, \cdots, g_d, g_1)$. There are two types of orbits, namely those tuples in $E_d$ and the orbits consisting of tuples with some entries distinct. Each tuple in $E_d$ forms an orbit itself, while each orbit of the other type consists of $d$ tuples. By class equation, 
\begin{eqnarray}|S|=|E_d|+\text{#tuples with some entries distinct}\end{eqnarray} 
Note that the set of tuples with some entries distinct is a disjoint union of orbits each of which consists of $d$ tuples. Thus $|E_d|$ is divisible by $d$.
Remark: This is just an adaption of the proof of Cauchy's theorem.
A: This is a theorem of Frobenius. He proved:
Theorem (Frobenius 1903): Let $d$ be a divisor of $|G|$ and $a_d$ be the number of elements of order dividing $d$. Then $a_d$ is divisible by $d$.
Note that $a_d=|E_d|$. A proof of this theorem is given, for example, by K. Brown here in Corollary $1.6$. The proof uses that
$$
a_d=\sum \mu (H,K) |H|,
$$
where $H$ and $K$ range over subgroups of order dividing $d$, obtained by Moebius inversion formula applied to the equations
$$
|H|=\sum_{K\le H}f(K),
$$
where $f(K)=0$, if $K$ is not cyclic, and $f(K)=\phi(k)$, if $K$ is cyclic of order $k$. For a detailed proof see the article On the Moebius function of a finite group by Hawkes et al, Theorem $6.3$.
Edit: The comments refer to an ealier answer.
