Count of Quadratic Residues