import math


def is_prime(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 = int(input())
numbers = [int(input()) for i in range(n)]


count = 0
for i in range(n):
    if is_prime(numbers[i]) is True:
        count += 1

print(count)
 import math math def is_prime(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 is_prime 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 = int(input()) n int(input()) int input() input int(input()) for i in range(n) for i in range(n) i range(n) range n for i in range(n) int(input()) int input() input numbers = [int(input()) for i in range(n)] numbers [int(input()) for i in range(n)] count = 0 count 0 for i in range(n):
    if is_prime(numbers[i]) is True:
        count += 1 i range(n) range n if is_prime(numbers[i]) is True:
        count += 1 is_prime(numbers[i]) is True is_prime(numbers[i]) is_prime numbers[i] numbers i True count += 1 count 1 print(count) print count count = 0 0 count count += 1 1 count n = int(input()) int(input()) n numbers = [int(input()) for i in range(n)] [int(input()) for i in range(n)] numbers def is_prime(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 is_prime(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 is_prime
import math


def is_prime(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 = int(input())
numbers = [int(input()) for i in range(n)]


count = 0
for i in range(n):
    if is_prime(numbers[i]) is True:
        count += 1

print(count)

