Number of invertible elements in quotient ring I want to find an analog of Euler function $\varphi_{R}(a)$ that determines the number of invertible elements in the quotient ring
$$R = \mathbb{F}_p[x]/(a), \text{ for } a \in \mathbb{F}_p[x]$$
where $\mathbb{F}_p[x]$ is a Euclidian domain with standard norm $N(f(x)) := \deg f(x)$.
UPD: I tried the following:
Case 1: $a$ is prime $\Rightarrow \mathbb{F}_p[x]/(a)$ is field then
$$\varphi_R(a) = |\mathbb{F}_p[x]/(a) \setminus \{0\}| = p^{deg(a)} - 1$$
Case 2: take factorization $a = a_1^{e_1} \dots a_n^{e_n}$ then
$$R \simeq \mathbb{F}_p[x]/(a_1^{e_1}) \oplus \mathbb{F}_p[x]/(a_2^{e_2}) \oplus \cdots\oplus\mathbb{F}_p[x]/(a_n^{e_n})$$
R is finite ring then 
$$\forall g \in R((g \text{ is zero divisor}) \vee (g \text{ is invertible}))$$
$$(g \text{ is zero divisor}) \iff \vee_{i = 1}^n(a_i | g)$$
Every element $g \in R$ now can be represented as following:
$$g = (g (\text{mod } a_1^{e_1}),\dots,g(\text{mod } a_n^{e_n}))$$
$$a_i | g \iff \exists i =1\dots n : g (\text{mod }a_i^{e_i}) = 0$$
So we can conclude
$$\varphi_R(a) = p^{deg(a)} - \prod_{i = 1}^n(p^{c_i} - 1), \text{ where } c_i = \deg(a_i^{e_i})$$
Is this answer correct?
 A: You are almost there. The first steps are as you described. Then just note that $R^\times \simeq \oplus_{i = 1}^n (\mathbb{F}_p[x]/(a_i^{e_i}))^\times$, so the number of invertible elements of $R$ is simply the product of the numbers of invertible elements of each $\mathbb{F}_p[x]/(a_i^{e_i})$.
Thus the question is reduced to finding the cardinal of $(\mathbb{F}_p[x]/(a^e))^\times$, where $a\in\mathbb{F}_p[x]$ is an irreducible polynomial. Let $d = \deg a$ be the degree of $a$.
Note that there is a surjective homomorphism of rings $\mathbb{F}_p[x]/(a^e) \rightarrow \mathbb{F}_p[x]/(a) = \mathbb{F}_{p^d}$, where $\mathbb{F}_{p^d}$ is the unique extension of $\mathbb{F}_p$ of degree $d$.
Taking units gives us a homomorphism of groups $$\pi:(\mathbb{F}_p[x]/(a^e))^\times \rightarrow \mathbb{F}_{p^d}^\times.$$
Now it is an easy exercise to show that $\pi$ is surjective, and the kernel $K$ of $\pi$ is equal to $(1 + a\mathbb{F}_p[x])/(a^e)$, which via the map $t \mapsto t - 1$ is in bijection with $a\mathbb{F}_p[x]/(a^e)$, which is a vector space over $\mathbb{F}_{p^d}$ of dimension $e - 1$.
Therefore, we have $\#(\mathbb{F}_p[x]/(a^e))^\times = \#K \cdot \#\mathbb{F}_{p^d}^\times = p^{d(e - 1)}\cdot(p^d - 1) = p^{de}(1 - \frac{1}{p^d})$.
You may compare this to the case of $(\mathbb{Z}/(p^e))^\times$.
