def isPrime(num):
    if num < 2: return False
    if num == 2: return True
    if num % 2 == 0: return False
    sqrtnum = num ** 0.5
    for i in range(3, int(sqrtnum + 1), 2):
        if num % i == 0:
            return False
    return True


def prime_number():
    n = int(input())
    count = 0
    for _ in range(n):
        a = int(input())
        if isPrime(a):
            count += 1
    print(count)

if __name__ == "__main__":
    prime_number() def isPrime(num):
    if num < 2: return False
    if num == 2: return True
    if num % 2 == 0: return False
    sqrtnum = num ** 0.5
    for i in range(3, int(sqrtnum + 1), 2):
        if num % i == 0:
            return False
    return True isPrime if num < 2: return False
     num < 2 num 2 if num == 2: return True
     num == 2 num 2 if num % 2 == 0: return False
     num % 2 == 0 num % 2 num 2 0 sqrtnum = num ** 0.5 sqrtnum num ** 0.5 num 0.5 for i in range(3, int(sqrtnum + 1), 2):
        if num % i == 0:
            return False
     i range(3, int(sqrtnum + 1), 2) range 3 int(sqrtnum + 1) int sqrtnum + 1 sqrtnum 1 2 if num % i == 0:
            return False
     num % i == 0 num % i num i 0 return False False return True True num num def prime_number():
    n = int(input())
    count = 0
    for _ in range(n):
        a = int(input())
        if isPrime(a):
            count += 1
    print(count) prime_number n = int(input()) n int(input()) int input() input count = 0 count 0 for _ in range(n):
        a = int(input())
        if isPrime(a):
            count += 1
     _ range(n) range n a = int(input()) a int(input()) int input() input if isPrime(a):
            count += 1
     isPrime(a) isPrime a count += 1 count 1 print(count) print count if __name__ == "__main__":
    prime_number() __name__ == "__main__" __name__ "__main__" prime_number() prime_number def prime_number():
    n = int(input())
    count = 0
    for _ in range(n):
        a = int(input())
        if isPrime(a):
            count += 1
    print(count) def prime_number():
    n = int(input())
    count = 0
    for _ in range(n):
        a = int(input())
        if isPrime(a):
            count += 1
    print(count) prime_number def isPrime(num):
    if num < 2: return False
    if num == 2: return True
    if num % 2 == 0: return False
    sqrtnum = num ** 0.5
    for i in range(3, int(sqrtnum + 1), 2):
        if num % i == 0:
            return False
    return True def isPrime(num):
    if num < 2: return False
    if num == 2: return True
    if num % 2 == 0: return False
    sqrtnum = num ** 0.5
    for i in range(3, int(sqrtnum + 1), 2):
        if num % i == 0:
            return False
    return True isPrime
def isPrime(num):
    if num < 2: return False
    if num == 2: return True
    if num % 2 == 0: return False
    sqrtnum = num ** 0.5
    for i in range(3, int(sqrtnum + 1), 2):
        if num % i == 0:
            return False
    return True


def prime_number():
    n = int(input())
    count = 0
    for _ in range(n):
        a = int(input())
        if isPrime(a):
            count += 1
    print(count)

if __name__ == "__main__":
    prime_number()