Let $A,B,C$ be positive integers, and let $Z$ be a positive parameter. Let $M$ be a positive integer, and consider the set of points
$$\displaystyle \{(x,y,z) \in \mathbb{Z}^3 : Ax^2 + By^2 + Cz^2 \leq MZ, Ax^2 + By^2 + Cz^2 \equiv 0 \pmod{M}\}.$$
Let $N(M;Z)$ denote the cardinality of the set above. How does $N(M;Z)$ compare to the cardinality of the set of integer points inside the ellipsoid $Ax^2 + By^2 + Cz^2 \leq Z$?