Number of elements in $\mathbb{Z}_p[x]/(f(x)).$ Let $f\in\mathbb{Z}_p[x]$, and define $N(f)$ to be the number of elements in $\mathbb{Z}_p[x]/(f(x)).$ Show that $N(fg)=N(f)N(g)$. Define $\phi(f)$. Then, show that $\phi(\pi^m)=N(\pi)^m-N(\pi)^{m-1}$ for any prime $\pi\in\mathbb{Z}_p[x]$. Is $\phi$ multiplicative?
 A: HINT: OK. Suppose that $\deg(f)=n$. What can you say about the number of elements in $\mathbb{Z}_p[x]/(f(x))$?
By using Euclid's division algorithm on $\mathbb{Z}_p[x]$ (I'm assuming that $p$ is prime, so $\mathbb{Z}_p$ is a field) you can see that for any polynomial $g(x)$ in $\mathbb{Z}_p[x]/(f(x))$ we can write:
$g(x) = f(x)\cdot q(x) + r(x)$ where $\deg(r(x)) < \deg(f(x))$.
So, all polynomials in $\mathbb{Z}_p[x]/(f(x))$ has a representative with degree less than $n=\deg(f(x))$. Since $\{1,x,\cdots, x^{n-1}\}$ is a basis for all polynomials of degree less than $n$ by definition every such polynomial is a linear combination of $a_0\cdot 1 + a_1 \cdot x + \cdots + a_{n-1} \cdot x^{n-1}$ where $a_i \in \mathbb{Z}_p$. Simple counting shows that there are $p^n$ such linear combinations.
Since $\mathbb{Z}_p$ is a field, we know that $\deg(fg)=\deg(f)+\deg(g)$.
But:
 $$N(fg)=p^{\deg(fg)}=p^{\deg(f)+\deg(g)}=p^{\deg{f}}\cdot p^{\deg{g}} = N(f) \cdot N(g)$$
Now define $\varphi(f)$ to be the number of polynomials that are not zero-divisors in $\bar{f} \in \mathbb{Z}_p[x]/(f(x))$. 
If $\pi$ is an irreducible polynomial in $\mathbb{Z}_p[x]$ then $\varphi(\pi)=N(\pi)-1$ because $\mathbb{Z}_p[x]/(\pi(x))$ will be a field and every non-zero element in it is a unit and hence no element excluding zero could be a zero divisor.
Now you can use the same logic for $\pi^m$. The idea is that if you want to see how many polynomials are not zero divisors in $\mathbb{Z}_p[x]/(\pi^m)$ you can count the number of elements that are not nilpotent in there. Can you take care of the rest from here?
To study if $\varphi(f)$ is multiplicative in the number theoretic sense of the word, suppose that $\gcd(f,g)=1$. Then $(f)+(g)=(\gcd(f,g))=(1)$. By using Chinese Remainder Theorem for commutative rings we now can see:
$$\mathbb{Z}_p[x]/(fg) \cong \mathbb{Z}_p[x]/(f) \oplus \mathbb{Z}_p[x]/(g)$$
Now you should count the number of elements that are not zero-divisors in $\mathbb{Z}_p[x]/(f) \oplus \mathbb{Z}_p[x]/(g)$.
