from sys import stdin
import math
def isPrime(x):
    if x == 2 or x == 3: return True
    elif (x < 2 or x % 2 == 0 or x % 3 == 0): return False
    s = int(math.sqrt(x) + 1)
    for i in range(5, s + 1, 2):
        if x % i == 0: return False
    return True
n = int(stdin.readline())
cnt = 0
for i in range(0, n):
    if isPrime(int(stdin.readline())): cnt += 1
print(cnt) from sys import stdin import math math def isPrime(x):
    if x == 2 or x == 3: return True
    elif (x < 2 or x % 2 == 0 or x % 3 == 0): return False
    s = int(math.sqrt(x) + 1)
    for i in range(5, s + 1, 2):
        if x % i == 0: return False
    return True isPrime if x == 2 or x == 3: return True
    elif (x < 2 or x % 2 == 0 or x % 3 == 0): return False
     x == 2 or x == 3 x == 2 x 2 x == 3 x 3 elif (x < 2 or x % 2 == 0 or x % 3 == 0): return False
     x < 2 or x % 2 == 0 or x % 3 == 0 x < 2 or x % 2 == 0 x < 2 x 2 x % 2 == 0 x % 2 x 2 0 x % 3 == 0 x % 3 x 3 0 s = int(math.sqrt(x) + 1) s int(math.sqrt(x) + 1) int math.sqrt(x) + 1 math.sqrt(x) math.sqrt math sqrt x 1 for i in range(5, s + 1, 2):
        if x % i == 0: return False
     i range(5, s + 1, 2) range 5 s + 1 s 1 2 if x % i == 0: return False
     x % i == 0 x % i x i 0 return True True x x n = int(stdin.readline()) n int(stdin.readline()) int stdin.readline() stdin.readline stdin readline cnt = 0 cnt 0 for i in range(0, n):
    if isPrime(int(stdin.readline())): cnt += 1 i range(0, n) range 0 n if isPrime(int(stdin.readline())): cnt  isPrime(int(stdin.readline())) isPrime int(stdin.readline()) int stdin.readline() stdin.readline stdin readline print(cnt) print cnt cnt = 0 0 cnt n = int(stdin.readline()) int(stdin.readline()) n def isPrime(x):
    if x == 2 or x == 3: return True
    elif (x < 2 or x % 2 == 0 or x % 3 == 0): return False
    s = int(math.sqrt(x) + 1)
    for i in range(5, s + 1, 2):
        if x % i == 0: return False
    return True def isPrime(x):
    if x == 2 or x == 3: return True
    elif (x < 2 or x % 2 == 0 or x % 3 == 0): return False
    s = int(math.sqrt(x) + 1)
    for i in range(5, s + 1, 2):
        if x % i == 0: return False
    return True isPrime
from sys import stdin
import math
def isPrime(x):
    if x == 2 or x == 3: return True
    elif (x < 2 or x % 2 == 0 or x % 3 == 0): return False
    s = int(math.sqrt(x) + 1)
    for i in range(5, s + 1, 2):
        if x % i == 0: return False
    return True
n = int(stdin.readline())
cnt = 0
for i in range(0, n):
    if isPrime(int(stdin.readline())): cnt += 1
print(cnt)