Size of fibers versus degrees of residue fields in a morphism of affine schemes Consider $\DeclareMathOperator{\Spec}{Spec} \newcommand{\F}{\Bbb F} \DeclareMathOperator{\Z}{\Bbb Z} \Spec \Z[i]\to\Spec\Z$ given by the inclusion of $\Z$ into $\Z[i]$.
Now, the fibers are as follows: 


*

*over every prime which is 1 mod 4, the fiber has two points because such primes split into two, e.g. $f^{-1}((5)) = \{(1+2i),(1-2i)\}$

*over primes congruent to 3 mod 4 (or over 2), there is one point since they are inert (resp. ramify)
In this pdf (not his main notes), Vakil asks the reader to compare the degree of the "residue" field extension with the number of points in the fiber. I'm guessing these will be the same except at $2$, but the weird thing is, this isn't happening: 


*

*Isn't $\Z[i]/(3)$ isomorphic to $\Bbb F_{3^2}$, since $x^2+1$ is irred mod $3$? This has degree two over $\Z/(3)$.

*In the same way, $\Z[i]/(1-2i)$ is congruent to $\F_5$, and has degree one over $\Z/(5)$.
I think I'm looking at the wrong fields somehow. Can someone explain what mistake I'm making?
Edit: The definition of the residue field I'm using is "field of fractions of $R/P$ with $P$ a prime ideal", which I believe is equivalent to the usual $R_P/PR_P$ condition.
 A: Write $f(x)=x^2+1$, and $R= \mathbb Z[x]/f(x)$. $R$ is of course (isomorphic to) $\mathbb Z[i]$, where one writes/identifies  $$ i = x \pmod{f(x)}.$$
Write $\phi \colon\, \mathop{\rm spec} R \to \mathop {\rm spec } \mathbb Z$ for the  morphism of schemes - and for the continuous map on the underlying topological spaces (abuse of notation?) - corresponding to the (finite) ring extension/inclusion $ {\mathbb Z} \hookrightarrow  R$. For any prime $\frak p$ of $R$, by definition, $\phi (\frak p) =   \frak p \cap \mathbb Z$. 
One has of course that $\phi^{-1}(\, (0)\,) = \{(0)\}$.
Suppose from now on that  $p$ is a non-zero prime of $\mathbb Z$. Then $A=R/pR= \mathbb F_p[x]/ f(x)$ is an algebra over $\mathbb F_p$ of dimension $2$, where we  also consider $f(x)$ as a polynomial of $\mathbb F_p[x]$ (abuse of notation!).  
Now, the (very small) lattice of ideals of $R$ containing $pR$ is isomorphic to the lattice of ideals of $A$. But the latter corresponds to the factorization of $f(x)=x^2+1$ over $\mathbb F_p$. In any case, the primes of $A$ (which are in fact maximal) are in bijection with the set $\phi^{-1} (\,(p)\,)$.
Now, since  $ f'(x)=2x$, and $ f(0)\not=0 \in \mathbb F_p$, the polynomial has repeated roots (is NOT separable) if and only if $p=2.$ 
In  fact, if $p=2$, then $ f(x) = (x+1)^2\in \mathbb F_2[x]$: we have that $(x+1)$ is the unique prime of $A$, and the unique prime of $R$ over $2$ is $\frak p= (i+1,2)$. On the other hand, $R$ is a unique factorization domain (in fact, a Euclidean ring), so $\frak p$ is principal: $\frak p = (i+1)$, and $2= -i(i+1)^2$. [To match up with your comment, if $\epsilon = x+1 \in A$, then $\epsilon \not =0$, but $\epsilon^2=0$, and $A =\mathbb F_2[\epsilon]$.] In any case, we see that $\phi^{-1}(\,(2)\,) = \{\frak p\}$, and ${R/\frak p} \simeq \mathbb F_2$. 
Suppose now $p\not = 2$. Then, by degree considerations, the separable $f(x)$ is either irreducible, or factors into two (distinct - relatively prime) linear factors. The latter occurs iff $f(x)$ has a root in $ \mathbb F_p$ - i.e., if and only if there exists $u\in \mathbb F_p$ such that $u^2 = -1$. 


*

*In the inert case - where $f(x)$ is an irreducible poly of $\mathbb F _p[x]$,  $A$ is a field (of degree $2$ over $\mathbb F_p$), and its unique (prime) ideal $(0)\subset A$ corresponds to the maximal ideal ${\frak p} = pR\subset R$ - the unique prime above $(p)\subset \mathbb Z$. Therefore, we see that $\phi^{-1}(p) = \{\frak p\}$, and $R/{\frak p} \simeq \mathbb F_{p^2}$.

*In the other (split) case,
$ f(x) = (x-u)(x+u) \in F_p[x],$ and, by the Chinese remainder theorem,
$$ A\simeq \mathbb F_p \times \mathbb F_p$$
as $\mathbb F_p$ algebras, (i.e., $A$ is isomorphic to a product (in the cat of $\mathbb F_p$ algebras) of fields of degree $1$) where the isomorphism is given by 
$$ x \mapsto (u,-u).$$
The above corresponds - though it does not matter for your question, per se - to the factorization into maximal (prime!) ideals in $R$ of 
$$ pR = {\frak p} \bar{\frak p}= (i-u, p)\,(i +u ,p),$$ for some $u$ (abuse of notation!) in $\mathbb Z$. [Edit - In fact, as $R$ is a UFD, there exists $a$ and $b \in \mathbb Z$ such that $\frak p =( a + bi)$ and $\bar {\frak p} = (a -ib)$; in fact, $p = a^2 + b^2$. ] In any event, in this case, one sees that there are $2$ primes above $(p)$: $\phi^{-1}(\,(p)\,) = \{\frak p,\bar{\frak p} \}$, and $R/{\frak p} \simeq R/\bar{\frak p} \simeq \mathbb F_p$.
To add a bit of number theory, where $p\not =2$: the multiplicative group $\mathbb F_p^*$ is cyclic of order $p-1$. As $(-1)^2=1\in \mathbb F_p$, $x^2=-1$ has a solution iff $4 | p-1$, or, equivalently, the prime $p$ splits in $R$ (and thus $\#\phi^{-1} (\,(p)\, ) =2 $) iff 
$$p \equiv 1 \pmod 4.$$
