Find the number of group homomorphisms from $\mathbb{Z}_8$ to $S_3$.
My try:
I know $\mathbb{Z}_8$ is a cyclic group of order $8$, and that the number of group homomorphisms from a cyclic group to any other group is determined where the generators of the cyclic group get mapped.
It is easy to notice that the generators of $\mathbb{Z}_8$ are
$\langle 1\rangle,\langle 3\rangle,\langle 5\rangle $ and $\langle 7\rangle $.
I also know that the order of the image divides the order of $S_3$ (as it forms a subgroup of $S_3$). Also if $f$ be the homomorphism, then $f(0)= (1)(2)(3)$. So till now I got $f(0)=(1)(2)(3)$, $|f(2)| \mid 6$, $|f(3)| \mid 6$, $|f(4)| \mid 6$, $|f(5)| \mid 6$, $|f(6)| \mid 6$, $|f(7)| \mid 6$, $|f(8)| \mid 6$. So the orders of $|f(i)|$ can be $1$ or $2$ or $3$ or $6$.
But how can I proceed from here?
Let $\varphi\colon\Bbb Z_8\longrightarrow S_3$ be a homomorphism. Since $1$ has order $8$, the order of $\varphi(1)$ must divide $8$. That is, it must be $1$, $2$, $4$ or $8$. But $S_3$ has no element whose order is $4$ or $8$, and the only $\varphi$ such that $\varphi(1)=\operatorname{Id}$ is the trivial homomorphism. Finally, $S_3$ has exactly three elements whose order is $2$ (the three transpositions), and if $\tau$ is any of them you can define $\varphi(n)=\tau^n$; it is a group homomorphism and it maps $1$ into $\tau$.
Therefore, there are $4$ such homomorphisms.