Number of ring homomorphisms form $\mathbb Z[x]$ to $\mathbb Z_{12}$ I have tried :
Let $f$ be an homomorphism  form $\mathbb Z[x]$ to $\mathbb Z_{12}$. we have to find the possible image of $1$ and $x$. Suppose $f(1) = a$, then $f(1)^2 = f(1) = a^2 = a$, then the possible value of $a = 0,4 , 9$,
if $f(1) = 0$, then $f = 0$
How to find the image of $x$.
Please help me how to proceed further.
Thank you

If $1$ goes to $1$, we can invoke the fact that $\mathbb{Z}[x]$ is the free commutative ring with unity on the set $\{x\}$ and note that $x$ can be sent to anything. Thus there are $12$ possible homomorphisms with $1$ sent to $1$.
There exist homomorphisms where $1$ does not go to $1$. The important thing is that $f(1)f(x)=f(x)$. If $f(1)=0$, then $f(x)=0$. If $f(1)=4$, we could have $f(x)=0$, $f(x)=4$ or $f(x)=8$. If $f(1)=9$, then we could have $f(x)=0$, $f(x)=3$, $f(x)=6$, or $f(x)=9$, thus there are $8$ additional possible homomorphisms. (If I calculated incorrectly you can sue me; in any case the procedure was to find all values $y$ such that $f(1)y=y$).
