import math
def prime(num):
    judge = True
    for i in range(2, int(math.sqrt(num)+1)):
        if num % i == 0:
            judge = False
    return judge
    
n = int(input())
cnt = 0
ns=[]
for i in range(n):
    num = int(input())
    if prime(num):
        cnt += 1
print(cnt) import math math def prime(num):
    judge = True
    for i in range(2, int(math.sqrt(num)+1)):
        if num % i == 0:
            judge = False
    return judge
     prime judge = True judge True for i in range(2, int(math.sqrt(num)+1)):
        if num % i == 0:
            judge = False
     i range(2, int(math.sqrt(num)+1)) range 2 int(math.sqrt(num)+1) int math.sqrt(num)+1 math.sqrt(num) math.sqrt math sqrt num 1 if num % i == 0:
            judge = False
     num % i == 0 num % i num i 0 judge = False judge False return judge judge num num n = int(input()) n int(input()) int input() input cnt = 0 cnt 0 ns=[] ns [] for i in range(n):
    num = int(input())
    if prime(num):
        cnt += 1 i range(n) range n num = int(input()) num int(input()) int input() input if prime(num):
        cnt += 1 prime(num) prime num cnt += 1 cnt 1 print(cnt) print cnt n = int(input()) int(input()) n cnt += 1 1 cnt def prime(num):
    judge = True
    for i in range(2, int(math.sqrt(num)+1)):
        if num % i == 0:
            judge = False
    return judge
     def prime(num):
    judge = True
    for i in range(2, int(math.sqrt(num)+1)):
        if num % i == 0:
            judge = False
    return judge
     prime ns=[] [] ns num = int(input()) int(input()) num cnt = 0 0 cnt
import math
def prime(num):
    judge = True
    for i in range(2, int(math.sqrt(num)+1)):
        if num % i == 0:
            judge = False
    return judge
    
n = int(input())
cnt = 0
ns=[]
for i in range(n):
    num = int(input())
    if prime(num):
        cnt += 1
print(cnt)
