Numbers $n$ for which there cannot be exactly $n$ group elements of order $n$. If this question has been asked before, then I'm sorry. I tried looking online and posted a chat message here to no avail.
Motivation:

Lemma 1: Each group has exactly $0$ elements of order $0$.

Proof: Trivial. $\square$

Lemma 2: Each group has exactly one element of order one.

Proof: That element is clearly the identity. $\square$

Lemma 3: No group has exactly two elements of order two.

Proof: Suppose $x$ and $y$ are the only elements of order two.
Suppose $xy=yx$. Then $(xy)^2=x(yx)y=x^2y^2=ee=e$. But if the order of $xy$ is two, then either $xy=x$, in which case $y=e,$ a contradiction, or $xy=y$, in which case $x=e$, another contradiction.
Therefore, $xy\neq yx$. Consider $xyx^{-1}$. We have
$$\begin{align}
(xyx^{-1})^2&=(xyx^{-1})(xyx^{-1})\\
&=xy^2x^{-1}\\
&=xx^{-1}\\
&=e,
\end{align}$$
so that either $xyx^{-1}=e$, which implies $y=e$, a contradiction, or $xyx^{-1}$ has order two. But then either $xyx^{-1}=x$, in which case $x=y$, a contradiction, or $xyx^{-1}=y$, in which case $xy=yx$, another contradiction. $\square$

Lemma 4: No group has exactly three elements of order three.

Proof: We have, for all $x$, that $\lvert x^{-1}\rvert=\lvert x\rvert$. But if there exist exactly three elements $a,b,c$ of order three, then the fact that none of them is its own inverse implies that, either, WLOG, $a^{-1}=b\neq c^{-1}=d$ for some $d$, which would have order three by the above, a contradiction, or each inverse is a new element of order three, another contradiction. $\square$
The Question:
For which $n\in\Bbb N$ there cannot be exactly $n$ elements of order $n$ in any group${}^\dagger$?
Thoughts:
I guess prime numbers are important here. I'm not sure why.
In $\Bbb Z_p$ for prime $p$, each nonidentity element has order $p$, and there are $p-1$ of them; that's close.
In $\Bbb Z$, there are countably infinitely many elements of order infinity. I had finite $n$ in mind though.

This question occurred to me upon learning Lemma 4. I knew about Lemma 3, so it seemed natural to ask.
It wouldn't surprise me if this has been investigated before.
I doubt I could answer it.

The technique of considering the case when the elements commute separately from when they don't, as in the proof of Lemma 3, seems unlikely to generalise to higher $n$; I'm not sure why I think this.
The fact that an element of order $n$ doesn't equal its inverse for $n\ge 3$ might help.

Please help :)

$\dagger$: The group need not be finite.
 A: For any $n \in \mathbb{N}$, let $G$ be a group with exactly $n$ elements of order $n$. Then there exists $a \in G$ of order $n$. Now, the elements of $\{a, a^2, ... , a^{n-1}\}$ of order $n$ will be exactly the elements $a^k$ with $k$ coprime to $n$. Therefore, exactly $\phi(n)$ of these elements will have order $n$. (See Euler's totient function). If $\phi(n)$ divides $n$, then we can construct the group $G = \mathbb{Z}_n \times \mathbb{Z}_m$, where $m = n / \phi(n)$. It is simple to verify that this group has exactly $n$ elements of order $n$.
We claim that for $n$ such that $\phi(n)$ does not divide $n$, no such group exists. Suppose for contradiction that $G$ has exactly $n$ elements of order $n$ and $\phi(n)$ does not divide $n$. we can write $G = \left\langle a, S| a^{n}=1, R\right\rangle$, where $S \cup \{a\}$ is the generating set and $R \cup \{a^n = 1\}$ is the set of relations. If $S$ is empty, then we have at most $\phi(n) < n$ elements of order $n$, a contradiction. Hence, we can assume there exists some $b \in S$. If $b$ is of infinite order and does not commute with $a$, then there will be infinitely many elements of order $n$ given by $\{bab^{-1}, b^2 a b^{-2}, ... \}$, a contradiction. In the case that $b$ does commute with $a$, then we have not added any elements of order $n$ so we still have $\phi(n) < n$ elements  of order $n$, a contradiction. Hence, $b$ is of finite order, say $m$. If $b$ commutes with $a$, there will be $\phi(n) m$ elements of order $n$, but since we are assuming there are exactly $n$ elements of order $n$, (so $ \phi(n) m = n$), this contradicts the fact that $\phi(n)$ does not divide $n$. If $b$ does not commute with $a$, a similar argument (using conjugation) yields the same contradiction.
Therefore, there exists a group with exactly $n$ elements of order $n$ if and only if $\phi(n)$ divides $n$. This nicely includes the prime case we discussed, since $\phi(p) = p-1$ for all prime $p$.
Moreover, it seems like this can be generalized to show that there exists a group with exactly $k$ elements of order $n$ if and only if $\phi(n)$ divides $k$. A nice result!
