I'm basically trying to count the lattice points in a rectangle that is made by the lines connecting points that are "congruent" to $0$ in $\mathbb{R}^2$ or a complex plane, to understand the geometrical meaning of the field $Z[i]/\langle 2+4i\rangle$. I hope to draw it in here and show you what I want to deal with, but unfortunately I don't know how to make graphical figures so just let me explain:
I'm going to find points that are congruent to $0$ with modulus $2+4i$ and connect them. that is, for example, the points like $2(2+4i)$, $3(2+4i)$, $(2+4i)(1-2i)=10$.
in particular, we know that 1, 2, 3, 4, 5, 6, 7, 8 and 9 are not congruent to $0$. that is, they are not divisible by $2+4i$. so I connected $0$, $2+4i$, $10$, and $8-4i$ to make a rectangle so that there's no point congruent to $0$ in this rectangle. and counted the lattice points, got $40$.
I saw several examples that this works with ideals $\langle a+bi\rangle$, $\gcd(a,b)=1$. but in this case, the $\gcd$ is not $1$. so I'm not sure that this approach is still applicable. is $40$ indeed the order of $Z[i]/\langle 2+4i\rangle$?
If not, how do you explain these fields $Z[i]/\langle a+bi\rangle$ with $\gcd(a,b)$ greater than $1$ geometrically?
First note, that if $a+bi$ is not a prime in $\def\Z{\mathbf Z}\Z[i]$ - this is always the case if $\gcd(a,b) > 1$ - then $\Z[i]/(a+bi)$ is not a field. It isn't even an integral domain, as a decomposition $a+bi = (c+di)(e+fi)$ in elements with smaller norm gives $$ 0 = [c+di][e+fi] \in \Z[i]/(a+bi) $$ where $[c+di] = c+di + \Z[i](a+bi)$ denotes the equivalence class. Hence $\Z[i]/(a+bi)$ has zero divisors.
For the geometric representation, there is no difference. Every element of $\Z[i]/(a+bi)$ has an unique representative in said rectangle. Just divide (recall that $\Z[i]$ is an Euclidean domain) a given $c+di$ by $a+bi$, giving $$ c+di = q(a+bi) + r $$ with $r= 0$ or $N(r) < N(a+bi)$. Now add (or subtract) $a+bi$ to possibly correct the sign of $\Re r$.