We want to find the number of items of the set $\{a \in \mathbb{Z}_{24} : a^{1001} = [5]\} $
Case: $\gcd(a,24)=1$
Using
- Euler's Theorem (if $(\gcd(a,n))=1 \Rightarrow a^{\phi(n)}\equiv1\bmod n$)
- $\phi(24)=\phi(2^3)\cdot\phi(3)=4\cdot2=8$
- $1001=8\cdot125+1$
we get,
$$a^{1001}=a^{8\cdot125}\cdot a \equiv a\bmod24 \equiv 5\bmod 24\Leftrightarrow a \equiv 5 \bmod24.$$
Case: $\gcd(a,24)\neq 1$
Any help would be greatly appreciated!