import math

def isprime(n):
    if x == 2:
        return True
    if x % 2 == 0:
        return False
    for i in range(3, math.floor(math.sqrt(n))+1 , 2):
        if x % i == 0:
            return False
    return True

n = int(input())
count = 0
for i in range(n):
    x = int(input())
    if isprime(x):
        count += 1
print(count) import math math def isprime(n):
    if x == 2:
        return True
    if x % 2 == 0:
        return False
    for i in range(3, math.floor(math.sqrt(n))+1 , 2):
        if x % i == 0:
            return False
    return True isprime if x == 2:
        return True
     x == 2 x 2 return True True if x % 2 == 0:
        return False
     x % 2 == 0 x % 2 x 2 0 return False False for i in range(3, math.floor(math.sqrt(n))+1 , 2):
        if x % i == 0:
            return False
     i range(3, math.floor(math.sqrt(n))+1 , 2) range 3 math.floor(math.sqrt(n))+1 math.floor(math.sqrt(n)) math.floor math floor math.sqrt(n) math.sqrt math sqrt n 1 2 if x % i == 0:
            return False
     x % i == 0 x % i x i 0 return False False return True True n n n = int(input()) n int(input()) int input() input count = 0 count 0 for i in range(n):
    x = int(input())
    if isprime(x):
        count += 1 i range(n) range n x = int(input()) x int(input()) int input() input if isprime(x):
        count += 1 isprime(x) isprime x count += 1 count 1 print(count) print count count = 0 0 count x = int(input()) int(input()) x count += 1 1 count def isprime(n):
    if x == 2:
        return True
    if x % 2 == 0:
        return False
    for i in range(3, math.floor(math.sqrt(n))+1 , 2):
        if x % i == 0:
            return False
    return True def isprime(n):
    if x == 2:
        return True
    if x % 2 == 0:
        return False
    for i in range(3, math.floor(math.sqrt(n))+1 , 2):
        if x % i == 0:
            return False
    return True isprime n = int(input()) int(input()) n
import math

def isprime(n):
    if x == 2:
        return True
    if x % 2 == 0:
        return False
    for i in range(3, math.floor(math.sqrt(n))+1 , 2):
        if x % i == 0:
            return False
    return True

n = int(input())
count = 0
for i in range(n):
    x = int(input())
    if isprime(x):
        count += 1
print(count)