Order of some quotient ring of Gaussian integers

HINT $\ $ If $\rm\ (a,b) = 1\ $ then $\rm\ x^2 = -1,\ a = b\:x\ \iff\ a^2 = -b^2,\ x = a/b\:.\ $ Therefore

$$\rm\mathbb Z[i]/(a-b\:i)\ \cong\ \mathbb Z[x]/(x^2+1,\ a-b\:x)\ \cong\ \mathbb Z[x]/(a^2+b^2,x-a/b)\ \cong\ \mathbb Z/(a^2+b^2) $$


Expanding on Qiaochu's comment, but trying to leave you some room to think:

$\mathbb{Z}[i]$ is a square lattice in the complex plane, and the ideal $(a+bi)$ is a square sublattice. (Why?) The index of $(a+bi)$ in $\mathbb{Z}[i]$ is the number of elements of $\mathbb{Z}[i]$ inside a fundamental square of $(a+bi)$, including part but not all of its boundary. (Why? And what's with the boundary funny business?) This is the same as the ratio of the area of the fundamental square of $\mathbb{Z}[i]$ to the area of the fundamental square of the sublattice $(a+bi)$. (Why?)

$\mathbb{Z}[i]$'s fundamental square is a unit square, so the question is really about the area of $(a+bi)$'s fundamental square. The line from $0$ to $a+bi$ is a side of this square...