here is my code:

```
class Solution:
# @param {integer} n
# @return {integer}
def countPrimes(self, n):
self.n = n
if n <= 1:
primes = []
else:
numbers = set(xrange(n,1,-1))
primes = []
for i in xrange(int(round(max(numbers)**(0.5)))):
p = numbers.pop()
primes.append(p)
numbers.difference_update(set(xrange(p*2,n+1,p)))
primes.extend(numbers)
a = len(primes)
return a
```

Can any one help me?