Problem: Let $R$ be a ring with identity. Prove that the number of ring homomorphisms $\mathbb{Z}[x] \to R$ is equal to the number of elements of $R.$
I can't seem to find any approach for this. There are no generators of $\mathbb{Z}[x]$. Can we try something else? Any hint is highly appreciated.
Thank you.
Proof. It is injective since if $\operatorname{ev}_r = \operatorname{ev}_s$, then $r=\operatorname{ev}_r(x) = \operatorname{ev}_s(x) = s$. It if surjective since if $f : \mathbb Z[x] \to R$ is a ring homomorphism, then for any non-negative integer $n$ and any $a_0,\dots,a_n \in \mathbb Z$ we have $$\begin{align} f \bigg( \sum_{k=0}^n a_kx^k \bigg) &= \sum_{k=0}^n f(a_k)f(x)^k \\ &=^{\color{blue}1} \sum_{k=0}^n (a_k1_R)f(x)^k \\ &= \sum_{k=0}^n a_kf(x)^k \\ &= \operatorname{ev}_{f(x)} \bigg( \sum_{k=0}^n a_kx^k \bigg) \end{align}$$ and so $f = \operatorname{ev}_{f(x)}$.
${}^{\color{blue}1}$ Recall that there is only one ring homomorphism $\mathbb Z \to R$, namely $m \mapsto m1_R$.