import math

def Isprime(x):
    if x == 2:
        return True
    i = 2
    while(i <= math.sqrt(x)):
        if(x%i==0):
            return False
        i += 1
    return True

n = int(input())

i = 0
count = 0
while(n>i):
    a = int(input())
    if(Isprime(a)==True):
        count += 1
    i += 1
print(count) import math math def Isprime(x):
    if x == 2:
        return True
    i = 2
    while(i <= math.sqrt(x)):
        if(x%i==0):
            return False
        i += 1
    return True Isprime if x == 2:
        return True
     x == 2 x 2 return True True i = 2 i 2 while(i <= math.sqrt(x)):
        if(x%i==0):
            return False
        i += 1
     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 += 1 i 1 return True True x x n = int(input()) n int(input()) int input() input i = 0 i 0 count = 0 count 0 while(n>i):
    a = int(input())
    if(Isprime(a)==True):
        count += 1
    i += 1 n>i n i a = int(input()) a int(input()) int input() input if(Isprime(a)==True):
        count += 1
     Isprime(a)==True Isprime(a) Isprime a True count += 1 count 1 i += 1 i 1 print(count) print count count = 0 0 count n = int(input()) int(input()) n a = int(input()) int(input()) a i += 1 1 i def Isprime(x):
    if x == 2:
        return True
    i = 2
    while(i <= math.sqrt(x)):
        if(x%i==0):
            return False
        i += 1
    return True def Isprime(x):
    if x == 2:
        return True
    i = 2
    while(i <= math.sqrt(x)):
        if(x%i==0):
            return False
        i += 1
    return True Isprime i = 0 0 i count += 1 1 count
import math

def Isprime(x):
    if x == 2:
        return True
    i = 2
    while(i <= math.sqrt(x)):
        if(x%i==0):
            return False
        i += 1
    return True

n = int(input())

i = 0
count = 0
while(n>i):
    a = int(input())
    if(Isprime(a)==True):
        count += 1
    i += 1
print(count)