# coding:utf-8
import math
def isprime(x):
    if x == 2:
        return True
    if x < 2 or x % 2 == 0:
        return False
    i = 3
    while i <= math.sqrt(x):
        if x % i == 0:
            return False
        i = i + 2
    return True
n = input()
array = []
cnt = 0
for i in range(n):
    array.append(input())
for i in range(n):
    if isprime(array[i]):
        cnt += 1
print cnt import math math def isprime(x):
    if x == 2:
        return True
    if x < 2 or x % 2 == 0:
        return False
    i = 3
    while i <= math.sqrt(x):
        if x % i == 0:
            return False
        i = i + 2
    return True isprime if x == 2:
        return True
     x == 2 x 2 return True True if x < 2 or x % 2 == 0:
        return False
     x < 2 or 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 = 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 = i + 2 i i + 2 i 2 return True True x x n = input() n input() input array = [] array [] cnt = 0 cnt 0 for i in range(n):
    array.append(input()) i range(n) range n array.append(input()) array.append array append input() input for i in range(n):
    if isprime(array[i]):
        cnt += 1 i range(n) range n if isprime(array[i]):
        cnt += 1 isprime(array[i]) isprime array[i] array i cnt += 1 cnt 1 print array = [] [] array n = input() input() n def isprime(x):
    if x == 2:
        return True
    if x < 2 or x % 2 == 0:
        return False
    i = 3
    while i <= math.sqrt(x):
        if x % i == 0:
            return False
        i = i + 2
    return True def isprime(x):
    if x == 2:
        return True
    if x < 2 or x % 2 == 0:
        return False
    i = 3
    while i <= math.sqrt(x):
        if x % i == 0:
            return False
        i = i + 2
    return True isprime cnt += 1 1 cnt cnt = 0 0 cnt
# coding:utf-8
import math
def isprime(x):
    if x == 2:
        return True
    if x < 2 or x % 2 == 0:
        return False
    i = 3
    while i <= math.sqrt(x):
        if x % i == 0:
            return False
        i = i + 2
    return True
n = input()
array = []
cnt = 0
for i in range(n):
    array.append(input())
for i in range(n):
    if isprime(array[i]):
        cnt += 1
print cnt