from math import sqrt

def isPrime(x):
    if x == 2:
        return True

    if x < 2 or x % 2 == 0:
        return False

    i = 3
    while i <= sqrt(x):
        if x % i == 0:
            return False
        i += 2

    return True


row_num = int(input())
count = 0
for row in range(row_num):
    if isPrime(int(input())):
        count += 1

print(count)
 from math import sqrt def isPrime(x):
    if x == 2:
        return True

    if x < 2 or x % 2 == 0:
        return False

    i = 3
    while i <= sqrt(x):
        if x % i == 0:
            return False
        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 <= sqrt(x):
        if x % i == 0:
            return False
        i += 2

     i <= sqrt(x) i sqrt(x) sqrt x if x % i == 0:
            return False
         x % i == 0 x % i x i 0 return False False i += 2 i 2 return True True x x row_num = int(input()) row_num int(input()) int input() input count = 0 count 0 for row in range(row_num):
    if isPrime(int(input())):
        count += 1 row range(row_num) range row_num if isPrime(int(input())):
        count += 1 isPrime(int(input())) isPrime int(input()) int input() input count += 1 count 1 print(count) print count row_num = int(input()) int(input()) row_num count += 1 1 count count = 0 0 count def isPrime(x):
    if x == 2:
        return True

    if x < 2 or x % 2 == 0:
        return False

    i = 3
    while i <= sqrt(x):
        if x % i == 0:
            return False
        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 <= sqrt(x):
        if x % i == 0:
            return False
        i += 2

    return True isPrime
from math import sqrt

def isPrime(x):
    if x == 2:
        return True

    if x < 2 or x % 2 == 0:
        return False

    i = 3
    while i <= sqrt(x):
        if x % i == 0:
            return False
        i += 2

    return True


row_num = int(input())
count = 0
for row in range(row_num):
    if isPrime(int(input())):
        count += 1

print(count)

