def isPrime(x):
    if x==2:
        return True
    
    if x<2 or x%2==0:
        return False
    
    for n in range(3,int(x**0.5)+1,2):
        if x%n==0:
            return False
    return True   

n=int(input())
num=[int(input()) for i in range(n)]

i=0
for nm in num:
    if isPrime(nm):
        i+=1
        
print(i) def isPrime(x):
    if x==2:
        return True
    
    if x<2 or x%2==0:
        return False
    
    for n in range(3,int(x**0.5)+1,2):
        if x%n==0:
            return False
    return True    isPrime if x==2:
        return True
    
     x==2 x 2 return True True if 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 for n in range(3,int(x**0.5)+1,2):
        if x%n==0:
            return False
     n range(3,int(x**0.5)+1,2) range 3 int(x**0.5)+1 int(x**0.5) int x**0.5 x 0.5 1 2 if x%n==0:
            return False
     x%n==0 x%n x n 0 return False False return True True x x n=int(input()) n int(input()) int input() input int(input()) for i in range(n) for i in range(n) i range(n) range n for i in range(n) int(input()) int input() input num=[int(input()) for i in range(n)] num [int(input()) for i in range(n)] i=0 i 0 for nm in num:
    if isPrime(nm):
        i+=1
         nm num if isPrime(nm):
        i+=1
         isPrime(nm) isPrime nm i+=1 i 1 print(i) print i n=int(input()) int(input()) n num=[int(input()) for i in range(n)] [int(input()) for i in range(n)] num i=0 0 i def isPrime(x):
    if x==2:
        return True
    
    if x<2 or x%2==0:
        return False
    
    for n in range(3,int(x**0.5)+1,2):
        if x%n==0:
            return False
    return True    def isPrime(x):
    if x==2:
        return True
    
    if x<2 or x%2==0:
        return False
    
    for n in range(3,int(x**0.5)+1,2):
        if x%n==0:
            return False
    return True    isPrime i+=1 1 i
def isPrime(x):
    if x==2:
        return True
    
    if x<2 or x%2==0:
        return False
    
    for n in range(3,int(x**0.5)+1,2):
        if x%n==0:
            return False
    return True   

n=int(input())
num=[int(input()) for i in range(n)]

i=0
for nm in num:
    if isPrime(nm):
        i+=1
        
print(i)