def isprime(x):
    import math
    if  x == 2:
        return True
    elif x < 2 or x % 2 == 0:
        return False
    else:
        i = 3
        while i <= math.sqrt(x):
            if x % i == 0:
                return False
            i += 2
        return True

N = int(input())
A=[]
for i in range(N):
    A.append(int(input()))
counter = 0
for i in range(0, N):
    if isprime(A[i]):
        counter += 1
        
print(counter) def isprime(x):
    import math
    if  x == 2:
        return True
    elif x < 2 or x % 2 == 0:
        return False
    else:
        i = 3
        while i <= math.sqrt(x):
            if x % i == 0:
                return False
            i += 2
        return True isprime import math math if  x == 2:
        return True
    elif x < 2 or x % 2 == 0:
        return False
    else:
        i = 3
        while i <= math.sqrt(x):
            if x % i == 0:
                return False
            i += 2
        return True x == 2 x 2 return True True elif x < 2 or x % 2 == 0:
        return False
     x < 2 or x % 2 == 0 x < 2 x 2 x % 2 == 0 x % 2 x 2 0 return False False i = 3 i 3 while i <= math.sqrt(x):
            if x % i == 0:
                return False
            i += 2
         i <= math.sqrt(x) i math.sqrt(x) math.sqrt math sqrt x if x % i == 0:
                return False
             x % i == 0 x % i x i 0 return False False i += 2 i 2 return True True x x N = int(input()) N int(input()) int input() input A=[] A [] for i in range(N):
    A.append(int(input())) i range(N) range N A.append(int(input())) A.append A append int(input()) int input() input counter = 0 counter 0 for i in range(0, N):
    if isprime(A[i]):
        counter += 1
         i range(0, N) range 0 N if isprime(A[i]):
        counter += 1
         isprime(A[i]) isprime A[i] A i counter += 1 counter 1 print(counter) print counter counter += 1 1 counter counter = 0 0 counter A=[] [] A N = int(input()) int(input()) N def isprime(x):
    import math
    if  x == 2:
        return True
    elif x < 2 or x % 2 == 0:
        return False
    else:
        i = 3
        while i <= math.sqrt(x):
            if x % i == 0:
                return False
            i += 2
        return True def isprime(x):
    import math
    if  x == 2:
        return True
    elif x < 2 or x % 2 == 0:
        return False
    else:
        i = 3
        while i <= math.sqrt(x):
            if x % i == 0:
                return False
            i += 2
        return True isprime
def isprime(x):
    import math
    if  x == 2:
        return True
    elif x < 2 or x % 2 == 0:
        return False
    else:
        i = 3
        while i <= math.sqrt(x):
            if x % i == 0:
                return False
            i += 2
        return True

N = int(input())
A=[]
for i in range(N):
    A.append(int(input()))
counter = 0
for i in range(0, N):
    if isprime(A[i]):
        counter += 1
        
print(counter)