x = int(input())

count = 0
for i in range(0, x):
    a =  int(input())
    for j in range ( 2,  a ):
        c = int(a)
        if a % j == 0:
            count += 1
            break;
        if j * j  > c:
            break;
        
print(x-count)
        
 x = int(input()) x int(input()) int input() input count = 0 count 0 for i in range(0, x):
    a =  int(input())
    for j in range ( 2,  a ):
        c = int(a)
        if a % j == 0:
            count += 1
            break;
        if j * j  > c:
            break;
         i range(0, x) range 0 x a =  int(input()) a int(input()) int input() input for j in range ( 2,  a ):
        c = int(a)
        if a % j == 0:
            count += 1
            break;
        if j * j  > c:
            break;
         j range ( 2,  a ) range 2 a c = int(a) c int(a) int a if a % j == 0:
            count += 1
            break;
         a % j == 0 a % j a j 0 count += 1 count 1 break if j * j  > c:
            break;
         j * j  > c j * j j j c break print(x-count) print x-count x count count += 1 1 count count = 0 0 count x = int(input()) int(input()) x a =  int(input()) int(input()) a c = int(a) int(a) c
x = int(input())

count = 0
for i in range(0, x):
    a =  int(input())
    for j in range ( 2,  a ):
        c = int(a)
        if a % j == 0:
            count += 1
            break;
        if j * j  > c:
            break;
        
print(x-count)
        

