def p(x):

 i=2

 while i<=x**.5:

  if x%i==0:return 0

  i+=1

 return 1

n=int(eval(input()))

print((sum([p(int(eval(input())))for _ in range(n)])))
def p(x):

 if x==2:return 1

 if x%2==0:return 0

 i=3

 while i<=x**.5:

  if x%i==0:return 0

  i+=2

 return 1

n=int(eval(input()))

print((sum([p(int(eval(input())))for _ in range(n)])))
def p(x):
    i = 2
    while i <= x**0.5:
        if x % i == 0:
            return 0
        i += 1
    return 1


n = int(eval(input()))
print((sum([p(int(eval(input()))) for _ in range(n)])))

def p(x):
    if x == 2:
        return 1
    if x % 2 == 0:
        return 0
    i = 3
    while i <= x**0.5:
        if x % i == 0:
            return 0
        i += 2
    return 1


n = int(eval(input()))
print((sum([p(int(eval(input()))) for _ in range(n)])))

-    i = 2 +    if x == 2: +        return 1 +    if x % 2 == 0: +        return 0 +    i = 3 -        i += 1 +        i += 2