Suppose I have a non-abelian group $G$ of order $pq$ ($\Rightarrow$ the center of $G$ is trivial) such that $p | (q-1)$.
The Class Equation gives $|G| = \sum[G:C(x)]$, where $C(x)$ denotes the centralizer of $x$, and the sum ranges over one element $x$ from each nontrivial conjugacy class. Since the centralizer of an element $x$ of $G$ is a subgroup of $G$, each of the summands is a divisor of $|G| = pq$. Thus, we may only have conjugacy classes of order $1$, $p$, $q$, or $pq$.
It's easy to see that, since the center of $G$ is trivial (i.e., the identity element $e$ is the only member of $Z(G)$ ), $[G:C(e)] = |G|/|C(e)| = (pq)/(pq) = 1$. Since $e$ is the only element of $G$ whose centralizer is all of $G$, it follows that we only have one conjugacy class of order $1$ in $G$. As such, we cannot have a conjugacy class of order $pq$, as then we would exceed the number of elements in the group. Thus, we only have conjugacy classes of order $p$ or $q$ remaining.
Upon viewing Number of conjugacy classes of nonabelian group of order $pq$., the user comment states that there are $p-1$ conjugacy classes of order $q$, and $(q-1)/p$ conjugacy classes of order $p$.
My question is, how did this user arrive at these values ? I definitely see that, taking the answer for granted for a moment, we then have $pq = 1 \cdot 1 + (p-1) \cdot q + (q-1)/p \cdot p$, so the given orders make sense. But, how to arrive at these exact orders $p-1$ and $(q-1)/p$ ? I see I haven't used the fact that $p|(q-1)$ here, so maybe that helps us out.
In general, how can I detect the number of conjugacy classes of a certain order, if we're not given the specific group $G$ that we're working with ?
Thanks!