How many elements are in the invertible set $\mathbb{Z}_n$?
it is called as Euler-phi function.$\Phi (n)=|\{1\leq a <n|(a,n)=1\}|$.
And $\Phi(p)=p-1$ for prime numbers and it is multiplicative i.e if $(m,n)=1$ then $\Phi(mn)=\Phi(m)\Phi(n)$.When you know this,it is easy to compute. $$\Phi(35)=\Phi(7)\Phi(5)=6\cdot4=24$$