This question of counting the number of lattice points a distance sqrt(N) away from the origin involves adding up the value of this simple function over all divisors of N. Now, remember why we're doing all of this.
Numbers with lots of factors have lots of divisors, primes only have two divisors, and you might think that you'd need perfect knowledge of the distribution of primes to get anything useful out of this.