I'm trying to understand the proof of a Burnside theorem (as stated in Beachy's Abstract Algebra p. 328): Let $p$ be prime number. The center of any $p$-group is nontrivial.
Now, In the proof they say that if we let $G$ be a $p$-group, then in the class equation $$|G| = |Z(G)|+\sum [G:C(x)]$$ for all $x$ that is not in the center and represent a conjugacy class, we see that every term in $\sum [G:C(x)]$ is divisible by $p$ since $x\not\in Z(G) \implies [G:C(x)]>1$. This last statement is what I do not understand, how do we know that $p \mid [G:C(x)]$ for any conjugacy class?
I know that the elements in the conjugacy class of $x$ is in bijection with the cosets of $C(x)$, i.e. $[G:C(x)]$, but how can we be certain that the number of elements in a conjugacy class of $x$/cosets of the centralizer of $x$ is divisible by $p$?