How many automorphisms does $C_{n}$ have? For $C_n,$ let $g$ is a generator, but except for non-trivial groups, $e$ is not.
So, ignore $e$, hence: $\{\forall i,j\in \{1,\cdots, n-1\}\,| \,\langle g^i \rangle\mapsto \langle g^j \rangle\}.$
All generators are mapped by any  other generator, as all are of the same order.
But, how to get number of automorphisms?
 A: $U(n)$ denote the multiplicative group of units of the ring $(\mathbb{Z}_n,+,\cdot )$.
Automorphism of a cyclic group can be completely determined by the image of the generators.
Let $f:C_n\to C_n$ be an automorphism and $C_n=\langle a\rangle$ then  $|f(a)|=|a|=n$. Hence $C_n=\langle f(a)\rangle$. Since the number of generators of $C_n$ is exactly $\varphi (n)$, you have exactly $\varphi (n)$ choices for $f(a)$.
Therefore, $\operatorname{Aut}(C_n)\cong U(n)$.
A: Let $f\colon\mathbb{Z}_n\rightarrow\mathbb{Z}_n$ be a homomorphism, then it is already uniquely defined by $f(1)$ as using the property of a homomorphism yields:
$$f(m)=f(\underbrace{1+\ldots+1}_{m\;\text{times}})
=\underbrace{f(1)+\ldots+f(1)}_{m\;\text{times}}
=m\cdot f(1).$$
For the group homomorphism $f_k\colon\mathbb{Z}_n\rightarrow\mathbb{Z}_n,f_k(1)=k\;\text{or}\;1\mapsto k$ to be invertible (and therefore be an automorphism), $k$ has to be invertible in $\mathbb{Z}_n$ (the inverse automorphism is then $f_{k^{-1}}$) and $(\mathbb{Z}_n,+,0)\rightarrow(\mathbb{Z}_n^\times,\cdot,1),k\mapsto f_k$ is an isomorphism (the inverse is $f\mapsto f(1)$), which yields:
$$\operatorname{Aut}(\mathbb{Z}_n)\cong\mathbb{Z}_n^\times.$$
In particular, using $160=32\cdot 5=2^5\cdot 5$ and using the Chinese remainder theorem (See here) we get:
$$\operatorname{Aut}(\mathbb{Z}_{160})\cong\mathbb{Z}_{160}^\times
\cong\mathbb{Z}_{32}^\times\times\mathbb{Z}_5^\times
\cong\mathbb{Z}_2\times\mathbb{Z}_4\times\mathbb{Z}_8,$$
where $\mathbb{Z}_p^\times\cong\mathbb{Z}_{p-1}$ for an odd prime $p$ and $\mathbb{Z}_{2^k}^\times\cong\mathbb{Z}_2\times\mathbb{Z}_{2^{k-2}}$ were used.
