Given that $\phi(p_1^{e_1} \cdots p_k^{e_k}) = p_1^{e_1} \cdots p_k^{e_k}(1-\frac{1}{p_1}) \cdots (1-\frac{1}{p_k})$
How to prove that the size of $\mathbb{Z}_n * = \{a \in \mathbb{Z}_n : \gcd(a,n)=1 \}$ is $\phi(n)$ ?
For the case $n = p^e$ where $p$ is prime, i did solve it, since $1,2,\cdots,p-1 + m p$ all have gcd $1$ with $p$ for all $0 \leq m < p^{e-1}$ so we have $(p-1)p^e$ relatively prime to $p$, but how to solve it in general case ?
Look at your first identity: $\phi(p_1^{e_1}\cdot \; .. \; \cdot p_n^{e_n}) = p_1^{e_1} \cdot \; .. \; \cdot p_n^{e_n}(1 - \frac{1}{p_1})\cdot \; .. \; \cdot(1 - \frac{1}{p_n})$, which in turns is equal to $p_1^{e_1 - 1}(p_1 - 1)\cdot \; .. \; \cdot p_n^{e_n - 1}(p_n - 1)$. Using the fact that $\phi(p^e) = p^{e - 1}(p - 1)$ and the isomorphism $\mathbb{Z}^{*}_{pq} \cong \mathbb{Z}^{*}_p \times \mathbb{Z}^{*}_q$, you get your result.