# -*- coding: utf-8 -*-

def isPrime(p):
    if p == 2:
        return True
    elif p < 2 or p%2 == 0:
        return False
    elif pow(2, p-1, p) == 1:
        return True
    else:
        return False

n = int(raw_input())
count = 0
for i in range(n):
    if isPrime(int(raw_input())):
        count += 1
print count def isPrime(p):
    if p == 2:
        return True
    elif p < 2 or p%2 == 0:
        return False
    elif pow(2, p-1, p) == 1:
        return True
    else:
        return False isPrime if p == 2:
        return True
    elif p < 2 or p%2 == 0:
        return False
    elif pow(2, p-1, p) == 1:
        return True
    else:
        return False p == 2 p 2 return True True elif p < 2 or p%2 == 0:
        return False
     p < 2 or p%2 == 0 p < 2 p 2 p%2 == 0 p%2 p 2 0 return False False elif pow(2, p-1, p) == 1:
        return True
     pow(2, p-1, p) == 1 pow(2, p-1, p) pow 2 p-1 p 1 p 1 return True True return False False p p n = int(raw_input()) n int(raw_input()) int raw_input() raw_input count = 0 count 0 for i in range(n):
    if isPrime(int(raw_input())):
        count += 1 i range(n) range n if isPrime(int(raw_input())):
        count += 1 isPrime(int(raw_input())) isPrime int(raw_input()) int raw_input() raw_input count += 1 count 1 print def isPrime(p):
    if p == 2:
        return True
    elif p < 2 or p%2 == 0:
        return False
    elif pow(2, p-1, p) == 1:
        return True
    else:
        return False def isPrime(p):
    if p == 2:
        return True
    elif p < 2 or p%2 == 0:
        return False
    elif pow(2, p-1, p) == 1:
        return True
    else:
        return False isPrime count = 0 0 count count += 1 1 count n = int(raw_input()) int(raw_input()) n
# -*- coding: utf-8 -*-

def isPrime(p):
    if p == 2:
        return True
    elif p < 2 or p%2 == 0:
        return False
    elif pow(2, p-1, p) == 1:
        return True
    else:
        return False

n = int(raw_input())
count = 0
for i in range(n):
    if isPrime(int(raw_input())):
        count += 1
print count