I need to find how many generators has a cyclic group $G=<g>$ of order $n$. I know that I have to prove that if $G$ is a cyclic group with order $n$, then the number of generators of $G$ is $\phi(n)$. But I don't know how can I prove that.
I already know that $<g^k>=<g^{gcd(k,n)}>$, so the generators of $G$ will be $g^k$ where $gcd(k,n)=1$