Solution
= Solution
A <primitive root modulo n>[primitive root modulo $p$] is a <residue> class generating the cyclic multiplicative <group> $(\mathbb Z/p\mathbb Z)^\times$, so its order is $p-1$. If $g$ is one generator, all generators are $g^j$ with $\gcd(j,p-1)=1$. Thus the number is
$$
\boxed{\varphi(p-1),}
$$
where $\varphi$ is <Euler's totient function>. This includes $p=2$, with $\varphi(1)=1$.