Let $R$ be a ring of algebraic integers, $p ∈\mathbb{Z}$ a prime integer. Then the set $\mathcal A$ of all prime ideals $P ⊂ R$ such that $P ∩ \mathbb{Z}= p\mathbb{Z}$ is finite and nonempty. Also, $pR = ∏P^{e_P}$ for some positive integers $e_P$, where the product is taken over all $P ∈\mathcal A$. Let $n$ be the degree of the quotient field of $R$ over $\mathbb{Q}$. Show that for every $P ∈\mathcal A$, the factor ring $R/P$ is a finite field with $p^{f_P}$ elements for some integer $f_P$. Prove that $n = ∑ e_P f_P$ , where the sum is taken over all $P ∈\mathcal A$. (Hint: Compute the number of elements in $R/pR$.)
I have shown that $R/P$ is a finite field, and by Chinese Remainder Theorem, $R/pR \cong \bigoplus R/P^{e_P}$. Also, since $p$ is in $\mathbb{Q}$, $N(p)=p^n$. It remains to show that $|R/pR|=p^n$ and $|R/P^{e_P}|=|R/P|^{e_P}$. But I don't know how to relate these together.