import math

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

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

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

    return True

if __name__ == "__main__":
    n = int(input())
    count = 0
    for i in range(n):
        if is_prime(int(input())):
            count += 1

    print(count) import math math def is_prime(x):
    if x == 2:
        return True

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

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

    return True is_prime if x == 2:
        return True

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

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

     i <= x_sqrt i x_sqrt 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 if __name__ == "__main__":
    n = int(input())
    count = 0
    for i in range(n):
        if is_prime(int(input())):
            count += 1

    print(count) __name__ == "__main__" __name__ "__main__" n = int(input()) n int(input()) int input() input count = 0 count 0 for i in range(n):
        if is_prime(int(input())):
            count += 1

     i range(n) range n if is_prime(int(input())):
            count += 1

     is_prime(int(input())) is_prime int(input()) int input() input count += 1 count 1 print(count) print count def is_prime(x):
    if x == 2:
        return True

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

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

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

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

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

    return True is_prime count = 0 0 count n = int(input()) int(input()) n count += 1 1 count
import math

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

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

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

    return True

if __name__ == "__main__":
    n = int(input())
    count = 0
    for i in range(n):
        if is_prime(int(input())):
            count += 1

    print(count)