counting number of primes in an interval(cntprime  on spoj).