# coding: utf-8
# Here your code !
import math
i = input()
count=0

def isPrime(x):
    global count
    if x == 2:
        return True
    if x>2 and x%2==0:
        return False
    i = 3
    while i<=math.sqrt(x):
        if x%i==0:
            return False
        i+=2
    return True

for j in range(int(i)):
    j=int(input())
    if isPrime(j):
        count+=1
print(count) import math math i = input() i input() input count=0 count 0 def isPrime(x):
    global count
    if x == 2:
        return True
    if x>2 and x%2==0:
        return False
    i = 3
    while i<=math.sqrt(x):
        if x%i==0:
            return False
        i+=2
    return True isPrime global count if x == 2:
        return True
     x == 2 x 2 return True True if x>2 and x%2==0:
        return False
     x>2 and 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 for j in range(int(i)):
    j=int(input())
    if isPrime(j):
        count+=1 j range(int(i)) range int(i) int i j=int(input()) j int(input()) int input() input if isPrime(j):
        count+=1 isPrime(j) isPrime j count+=1 count 1 print(count) print count count+=1 1 count count=0 0 count i = input() input() i def isPrime(x):
    global count
    if x == 2:
        return True
    if x>2 and x%2==0:
        return False
    i = 3
    while i<=math.sqrt(x):
        if x%i==0:
            return False
        i+=2
    return True def isPrime(x):
    global count
    if x == 2:
        return True
    if x>2 and x%2==0:
        return False
    i = 3
    while i<=math.sqrt(x):
        if x%i==0:
            return False
        i+=2
    return True isPrime j=int(input()) int(input()) j
# coding: utf-8
# Here your code !
import math
i = input()
count=0

def isPrime(x):
    global count
    if x == 2:
        return True
    if x>2 and x%2==0:
        return False
    i = 3
    while i<=math.sqrt(x):
        if x%i==0:
            return False
        i+=2
    return True

for j in range(int(i)):
    j=int(input())
    if isPrime(j):
        count+=1
print(count)