$|S|$ is the definition of Euler's Totient Function.
> Define $CP_n:=\\{n>N \in \mathbb N \mid GCD(n,N)=1 \\}$.
>
> Euler's Totient function $\phi$ is a function $\phi: \mathbb N \to \mathbb N$ such that $n \mapsto |CP_n|$. In words, $\phi (n)$ is the number of numbers less than and co-prime to $n$.
I'll recollect some properties here:
> * $\phi(p)=p-1 \iff p$ is a prime number.
> * For co-prime integers, $a$ and $b$, $\phi(ab)=\phi(a)\phi(b)$. That is, $\phi$ is multiplicative.
> * $\phi(p^k)=p^{k-1}(p-1)$ for prime $p$.
>
For proofs, please go through the Wikipedia page. In particular, the last equality is very helpful to solve your problem.