import math
n = int(input())
count = 0
for i in range(n):
    a = int(input())
    for j in range(2,int(math.sqrt(a) + 1)):
        if a % j == 0:
            break
    else:
        count += 1  
print(count) import math math n = int(input()) n int(input()) int input() input count = 0 count 0 for i in range(n):
    a = int(input())
    for j in range(2,int(math.sqrt(a) + 1)):
        if a % j == 0:
            break
    else:
        count += 1   i range(n) range n a = int(input()) a int(input()) int input() input for j in range(2,int(math.sqrt(a) + 1)):
        if a % j == 0:
            break
    else:
        count += 1   j range(2,int(math.sqrt(a) + 1)) range 2 int(math.sqrt(a) + 1) int math.sqrt(a) + 1 math.sqrt(a) math.sqrt math sqrt a 1 if a % j == 0:
            break
     a % j == 0 a % j a j 0 break count += 1 count 1 print(count) print count count += 1 1 count count = 0 0 count n = int(input()) int(input()) n a = int(input()) int(input()) a
import math
n = int(input())
count = 0
for i in range(n):
    a = int(input())
    for j in range(2,int(math.sqrt(a) + 1)):
        if a % j == 0:
            break
    else:
        count += 1  
print(count)