This is Frobenius theorem.
Suppose $G$ is a finite group such that $d$ divides $|G|$. Then the number of solutions to $x^d = 1$ is a multiple of $d$.
Since the identity is always a solution, there exist at least $d$ solutions. This is true for all finite groups, but it is not very easy to prove.
A proof can be found in the following Monthly article:
I. M. Isaacs, G. R. Robinson, On a Theorem of Frobenius: Solutions of $x^n = 1$ in finite groups, Amer. Math. Monthly, Vol. 99, No. 4, 352-354, (1992).
The theorem can be generalized in many different ways. A proof of the following generalization is given in Marshall Hall's group theory book:
Let $G$ be a finite group and $C$ a conjugacy class of $G$. The number of elements $x$ such that $x^n \in C$ is a multiple of $\gcd(n|C|, |G|)$.
The original theorem follows from the case $C = \{1\}$.