Background
Definition: The function $N:\mathbb{Z}[\sqrt d] \to \mathbb{Z}$ given by
$$N(a+b\sqrt d)=(a+b\sqrt d)(a-b\sqrt d)=a^2 - db^2$$
is called the norm.
Exercise 39: Let $I$ be a nonzero ideal in $\mathbb{Z}[i]$. Show that the quotient ring $\mathbb{Z}[i]/I$ is finite.
Proof: Let $I$ be a nonzero principal ideal in $\mathbb{Z}[i],$ and let $a \in I.$ By the division algorithm, every element $b$ of $\mathbb{Z}[i]$ can be written as $b=ay+p,$ where $N(p)<N(a).$ Hence every element of $\mathbb{Z}[i]$ contains a $p$ with $N(p)<N(a),$ so it suffices to show that there are finitely many such $p.$ But this is clear: if $=w+iz$ has norm less than $n,$ then $w^2 + z^2<n$ and hence $|w|$ and $|z|$ are less than $n,$ hence there are certainly less that $4n^2 + 4n +1$ possibilities for $p$.
Questions:
For the proof above, I don't understand how the author got the number $4n^2 + 4n +1.$ Is the author counting the number of possibilities for $a, b$ in $a^2 - db^2?$ If so, how?
Thank you in advance