# -*- coding : utf-8 -*-



import math



def is_prime_number(num):

    if num == 2:

        return True

    if num < 2 or num % 2 == 0:

        return False

    i = 3

    while i <= math.sqrt(num):

        if num % i == 0:

            return False

        i = i + 2

    return True



list_num = int(eval(input()))

count_prime = 0

for i in range(list_num):

    num = int(eval(input()))

    if is_prime_number(num):

        count_prime = count_prime + 1

print(count_prime)
import math



def is_prime(num):

    if num == 2:

        return True

    elif num < 2 or num % 2 == 0:

        return False

    else:

        i = 3

        while i <= math.sqrt(num):

            if num % i == 0:

                return False

            i += 2

    return True





if __name__ == '__main__':

    n = int(eval(input()))

    prime_numbers = []



    for i in range(n):

        num = int(eval(input()))

        if is_prime(num):

            prime_numbers.append(num)



    print((len(prime_numbers)))



# -*- coding : utf-8 -*-
import math


def is_prime_number(num):
    if num == 2:
        return True
    if num < 2 or num % 2 == 0:
        return False
    i = 3
    while i <= math.sqrt(num):
        if num % i == 0:
            return False
        i = i + 2
    return True


list_num = int(eval(input()))
count_prime = 0
for i in range(list_num):
    num = int(eval(input()))
    if is_prime_number(num):
        count_prime = count_prime + 1
print(count_prime)

import math


def is_prime(num):
    if num == 2:
        return True
    elif num < 2 or num % 2 == 0:
        return False
    else:
        i = 3
        while i <= math.sqrt(num):
            if num % i == 0:
                return False
            i += 2
    return True


if __name__ == "__main__":
    n = int(eval(input()))
    prime_numbers = []
    for i in range(n):
        num = int(eval(input()))
        if is_prime(num):
            prime_numbers.append(num)
    print((len(prime_numbers)))

-# -*- coding : utf-8 -*- -def is_prime_number(num): +def is_prime(num): -    if num < 2 or num % 2 == 0: +    elif num < 2 or num % 2 == 0: -    i = 3 -    while i <= math.sqrt(num): -        if num % i == 0: -            return False -        i = i + 2 +    else: +        i = 3 +        while i <= math.sqrt(num): +            if num % i == 0: +                return False +            i += 2 -list_num = int(eval(input())) -count_prime = 0 -for i in range(list_num): -    num = int(eval(input())) -    if is_prime_number(num): -        count_prime = count_prime + 1 -print(count_prime) +if __name__ == "__main__": +    n = int(eval(input())) +    prime_numbers = [] +    for i in range(n): +        num = int(eval(input())) +        if is_prime(num): +            prime_numbers.append(num) +    print((len(prime_numbers)))