from math import sqrt
def isPrime(x):
    if x == 2:
        return True
    if x < 2 or x % 2 == 0:
        return False
    i, xx = 3, int(sqrt(x))
    while i <= xx:
        if x % i == 0:
            return False
        i = i + 2
    return True

N = int(input())
print(sum([1 for _ in range(N) if isPrime(int(input()))])) from math import sqrt def isPrime(x):
    if x == 2:
        return True
    if x < 2 or x % 2 == 0:
        return False
    i, xx = 3, int(sqrt(x))
    while i <= xx:
        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, xx = 3, int(sqrt(x)) i 3 xx int(sqrt(x)) int sqrt(x) sqrt x while i <= xx:
        if x % i == 0:
            return False
        i = i + 2
     i <= xx i xx 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 = int(input()) N int(input()) int input() input 1 for _ in range(N) if isPrime(int(input())) for _ in range(N) if isPrime(int(input())) _ range(N) range N isPrime(int(input())) isPrime int(input()) int input() input if isPrime(int(input())) 1 print(sum([1 for _ in range(N) if isPrime(int(input()))])) print sum([1 for _ in range(N) if isPrime(int(input()))]) sum [1 for _ in range(N) if isPrime(int(input()))] def isPrime(x):
    if x == 2:
        return True
    if x < 2 or x % 2 == 0:
        return False
    i, xx = 3, int(sqrt(x))
    while i <= xx:
        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, xx = 3, int(sqrt(x))
    while i <= xx:
        if x % i == 0:
            return False
        i = i + 2
    return True isPrime N = int(input()) int(input()) N
from math import sqrt
def isPrime(x):
    if x == 2:
        return True
    if x < 2 or x % 2 == 0:
        return False
    i, xx = 3, int(sqrt(x))
    while i <= xx:
        if x % i == 0:
            return False
        i = i + 2
    return True

N = int(input())
print(sum([1 for _ in range(N) if isPrime(int(input()))]))