I read on a forum somewhere that the totient function can be calculated by finding the product of one less than each of the number's prime factors. For example, to find $\phi(30)$, you would calculate $(2-1)\times (3-1)\times (5-1) = 8$.
I can't seem to get my head round why this works and don't know what to type in to google to find a formal proof. Could someone please explain in an easy to understand way why this works.
By definition, $\phi(30)$ is the count of numbers less than $30$ that are co-prime to it. Also, $\phi(abc) = \phi(a)\times \phi(b)\times \phi(c)$. Note that $\phi(p)$ for all primes is always $p - 1$ because there are $p - 1$ numbers less than any given prime $p$, and all numbers less than a prime are coprime to it.
This means $\phi(30) = \phi(2\cdot 3 \cdot 5) = \phi(2) \cdot \phi(3) \cdot \phi(5) = (2-1)(3-1)(5-1) = 8$. But $\phi(60) = 16 \ne (2 - 1)(3 - 1)(5 - 1)$ so what you said is not always true. It is true only if you have an order $1$ of all the prime divisors.