In ex. 1.2.3 on p.21 of Diamond's A first course in modular forms, I was trying to show that $$|SL_2(\mathbb{Z}/N \mathbb{Z})|=N^3 \prod_{p|N}(1-1/p^2).$$
First of all, I knew that If $F$ is a field with $q$ elements, then $|GL_2(F)|=(q^2-1)(q^2-q)$. If we consider the surjective homomorphism $\det : GL_2(F) \rightarrow F^*$ with kernel $SL_2(F)$, then we have $|SL_2(F)|=(q^2-1)(q^2-q)/(q-1)=q(q^2-1)=q^3-q$. Therefore if we replace $F$ by $\mathbb{Z}/N \mathbb{Z}$, we get $|SL_2(\mathbb{Z}/N \mathbb{Z})|= N^3-N$, but thats' not agree with the book, so what's wrong with me...? In fact, in the part (a) of the problem, it asks us show $|SL_2(\mathbb{Z}/p^e \mathbb{Z})|=p^{3e}(1-1/p^2)$ for $p$ prime (that's already doesn't agree with my conclusion...), and uses chinese remainder theorem to conclude.