How the output for testcase 1 to 10 is 4

and for 11 to 20 it is 4

The output is this because the number of prime numbers between 1 and 10 is 4. These are 2,3,5,7. Similarly prime numbers between 11 and 20 are 11,13,17,19, so answer is again 4