It was proved in class that $\mathbb{Z}[i]/<a+bi>$ has $a^2+b^2$ elements which I did not understand.
$a+bi$ is equivalent to $0$ in $\mathbb{Z}[i]/<a+bi>$. $a+bi=0 \implies i=\frac{-a}{b}\implies a^2+b^2=0$. Which means that $\mathbb{Z}[i]/<a+bi>$ has $a^2+b^2$ distinct cosets. So I didn't understand the last step, why does that imply $a^2+b^2$ cosets? Thanks and appreciate a hint.