
import math

##素数判定を行う関数
def prime(p):
    if p==2 or p==3:
        return True
    else:
        i = int(math.sqrt(p))
        while i>=2:
            if p%i==0:
                return False
                break
            i-=1
        return True
                
            

N = int(input())
count = 0

for i in range(N):
    a = int(input())
    if prime(a)==True:
        count+=1
        
print(count) import math math def prime(p):
    if p==2 or p==3:
        return True
    else:
        i = int(math.sqrt(p))
        while i>=2:
            if p%i==0:
                return False
                break
            i-=1
        return True
                
             prime if p==2 or p==3:
        return True
    else:
        i = int(math.sqrt(p))
        while i>=2:
            if p%i==0:
                return False
                break
            i-=1
        return True
                
             p==2 or p==3 p==2 p 2 p==3 p 3 return True True i = int(math.sqrt(p)) i int(math.sqrt(p)) int math.sqrt(p) math.sqrt math sqrt p while i>=2:
            if p%i==0:
                return False
                break
            i-=1
         i>=2 i 2 if p%i==0:
                return False
                break
             p%i==0 p%i p i 0 return False False break i-=1 i 1 return True True p p N = int(input()) N int(input()) int input() input count = 0 count 0 for i in range(N):
    a = int(input())
    if prime(a)==True:
        count+=1
         i range(N) range N a = int(input()) a int(input()) int input() input if prime(a)==True:
        count+=1
         prime(a)==True prime(a) prime a True count+=1 count 1 print(count) print count N = int(input()) int(input()) N count = 0 0 count def prime(p):
    if p==2 or p==3:
        return True
    else:
        i = int(math.sqrt(p))
        while i>=2:
            if p%i==0:
                return False
                break
            i-=1
        return True
                
             def prime(p):
    if p==2 or p==3:
        return True
    else:
        i = int(math.sqrt(p))
        while i>=2:
            if p%i==0:
                return False
                break
            i-=1
        return True
                
             prime a = int(input()) int(input()) a count+=1 1 count

import math

##素数判定を行う関数
def prime(p):
    if p==2 or p==3:
        return True
    else:
        i = int(math.sqrt(p))
        while i>=2:
            if p%i==0:
                return False
                break
            i-=1
        return True
                
            

N = int(input())
count = 0

for i in range(N):
    a = int(input())
    if prime(a)==True:
        count+=1
        
print(count)
