import math
def isprime(n):
    if n==1:
        return False
    elif n==2:
        return True
    k=int(math.sqrt(n))+1
    for i in range(2,k+1):
        if n%i==0:
            return False
    return True
N=int(input())
ans=0
for i in range(N):
    if isprime(int(input())):
        ans+=1
print(ans)
 import math math def isprime(n):
    if n==1:
        return False
    elif n==2:
        return True
    k=int(math.sqrt(n))+1
    for i in range(2,k+1):
        if n%i==0:
            return False
    return True isprime if n==1:
        return False
    elif n==2:
        return True
     n==1 n 1 return False False elif n==2:
        return True
     n==2 n 2 return True True k=int(math.sqrt(n))+1 k int(math.sqrt(n))+1 int(math.sqrt(n)) int math.sqrt(n) math.sqrt math sqrt n 1 for i in range(2,k+1):
        if n%i==0:
            return False
     i range(2,k+1) range 2 k+1 k 1 if n%i==0:
            return False
     n%i==0 n%i n i 0 return False False return True True n n N=int(input()) N int(input()) int input() input ans=0 ans 0 for i in range(N):
    if isprime(int(input())):
        ans+=1 i range(N) range N if isprime(int(input())):
        ans+=1 isprime(int(input())) isprime int(input()) int input() input ans+=1 ans 1 print(ans) print ans def isprime(n):
    if n==1:
        return False
    elif n==2:
        return True
    k=int(math.sqrt(n))+1
    for i in range(2,k+1):
        if n%i==0:
            return False
    return True def isprime(n):
    if n==1:
        return False
    elif n==2:
        return True
    k=int(math.sqrt(n))+1
    for i in range(2,k+1):
        if n%i==0:
            return False
    return True isprime ans+=1 1 ans N=int(input()) int(input()) N ans=0 0 ans
import math
def isprime(n):
    if n==1:
        return False
    elif n==2:
        return True
    k=int(math.sqrt(n))+1
    for i in range(2,k+1):
        if n%i==0:
            return False
    return True
N=int(input())
ans=0
for i in range(N):
    if isprime(int(input())):
        ans+=1
print(ans)

