import math

def prime(x):
    for i in range(2, int(math.sqrt(x))+1): 
        if x % i == 0:
            return False
    return True

n = int(raw_input())
a = []
for i in range(n):
    a.append(int(raw_input()))

num = 0
for i in range(n):
    if prime(a[i]):
        num += 1
print num import math math def prime(x):
    for i in range(2, int(math.sqrt(x))+1): 
        if x % i == 0:
            return False
    return True prime for i in range(2, int(math.sqrt(x))+1): 
        if x % i == 0:
            return False
     i range(2, int(math.sqrt(x))+1) range 2 int(math.sqrt(x))+1 int(math.sqrt(x)) int math.sqrt(x) math.sqrt math sqrt x 1 if x % i == 0:
            return False
     x % i == 0 x % i x i 0 return False False return True True x x n = int(raw_input()) n int(raw_input()) int raw_input() raw_input a = [] a [] for i in range(n):
    a.append(int(raw_input())) i range(n) range n a.append(int(raw_input())) a.append a append int(raw_input()) int raw_input() raw_input num = 0 num 0 for i in range(n):
    if prime(a[i]):
        num += 1 i range(n) range n if prime(a[i]):
        num += 1 prime(a[i]) prime a[i] a i num += 1 num 1 print num += 1 1 num def prime(x):
    for i in range(2, int(math.sqrt(x))+1): 
        if x % i == 0:
            return False
    return True def prime(x):
    for i in range(2, int(math.sqrt(x))+1): 
        if x % i == 0:
            return False
    return True prime n = int(raw_input()) int(raw_input()) n a = [] [] a num = 0 0 num
import math

def prime(x):
    for i in range(2, int(math.sqrt(x))+1): 
        if x % i == 0:
            return False
    return True

n = int(raw_input())
a = []
for i in range(n):
    a.append(int(raw_input()))

num = 0
for i in range(n):
    if prime(a[i]):
        num += 1
print num