This is a slightly different question than others on this topic. For the equation $x^2+y^2 \leq r$ where $r$ can be any integer and not just a perfect square, when is the number of lattice points that fall under this region odd, and when is it even? What if the region was $x^2+y^2 < r$?
I would prefer a solution with intermediate level counting, as this problem was one from a competition of similar level. Also, if you're able to find a general formula for the exact number of lattice points, that would be greatly appreciated as well.