TITLE: Number of elements of order coprime to $p$ in a finite group
QUESTION [18 upvotes]: Let $G$ be a finite group. It is easy to prove that the elements of $G$ with odd order are in odd number. Indeed, if, for every divisor $d$ of the order of $G$, $r_{d}$ denotes the number of elements of $G$ with order $d$, then the number of  elements of $G$ with odd order is $1 + \sum_{d} r_{d}$, where $d$ ranges over the odd divisors of $\vert G \vert$ such that $d \geq 3$; but $r_{d}$ is divisible by $\varphi (d)$ (Euler function) and, for a naturel number $n \geq 3$, $\varphi (n)$ is even, thus it is well true that the elements of $G$ with odd order are in odd number.
So, my question is : let $G$ be a finite group and $p$ a prime number; is it known if it is necessarily true that the elements of $G$ with order coprime to $p$ are in number coprime to $p$ ?
I found some lemmas and, if I am not wrong, these lemmas make it possible to prove that the answer is "yes" for every group of order $\leq 431$. Since my proof of this meager result is very long, I will only sketch it if I don't get a better answer.
Edit (August 8, 2021). I discover that this question is Exercise 28 b) in Bourbaki, Algèbre, ch. I (Paris, 1970), § 6, p. I.139.

REPLY [4 votes]: And these are my considerations.
Let $G$ be a finite group of order $n$ and
let $p$ be a prime and $p\mid n$.
Denote by
$\Omega_p(G)=\{x\in G\,\mid\,{\rm gcd}(|x|,p)=p\}$
and
$\Omega_{p'}(G)=\{x\in G\,\mid\,{\rm gcd}(|x|,p)=1\}$.
Since
$
\Omega_{p}(G)\cup\Omega_{p'}(G)=G
$
and
$
\Omega_{p}(G)\cap\Omega_{p'}(G)=\varnothing
$
it follows that
both numbers $|\Omega_{p}(G)|$ and $|\Omega_{p'}(G)|$ are not divisible by $p$ or divisible by $p$ at the same time.
Theorem.
If $G$ is a finite group of order $n$ and
$p$ is a prime and $p\mid n$, then $|\Omega_{p}(G)|$ is not divisible by $p$.
Proof hints:

Let $P$ be a Sylow $p$-subgroup of $G$.
If $P\leq Z(G)$, then
$$
\Omega_{p}(G)=(g_1P\setminus\{g_1\})\cup\ldots\cup(g_sP\setminus\{g_s\})
$$
where $s=|G:P|$ and ${\rm gcd}(|g_i|,p)=1$.
Then $|\Omega_{p}(G)|=|G|-|G:P|$.

The group $P$ acts on the set $\Omega_{p}(G)$ by conjugation.
Then $\Omega_{p}(G)$ is a union of orbits under the action of $P$ and each
such orbit contains $|P:C_P(x)|$ elements where $x$ lie in the orbit.

Consider orbits consisting of a single element (for them $|P:C_P(x)|=1$).
Let
$$
H=\{x\in G\,\mid\,|P:C_P(x)|=1\}=\{x\in G\,\mid\,[x,P]=1\}.
$$
Let $O(x_1),\ldots,O(x_t)$ be the orbits of size $|P:C_P(x_i)|>1$.
Then
$$
\Omega_{p}(G)=O(x_1)\cup\ldots\cup O(x_t)\cup\Omega_{p}(H)
$$
and
$$
|\Omega_{p}(G)|=|O(x_1)|+\ldots|O(x_t)|+|\Omega_{p}(H)|.
$$
Since $Z(P)\leq H$, $|H|$ is divisible by $p$.

If $H\neq G$, then by induction $|\Omega_{p}(H)|$ is not divisible by $p$.

If $H=G$, then $P\leq Z(G)$ (see case 1)