Leetcode Count Primes Problem