import math

def prime_number(num):

    if num == 1 :

        return 0

    for i in range(2,int(math.sqrt(num))+1):

        if (num % i) == 0:

            return 0

    return 1



N =int(eval(input()))

count = 0

for i in range(0,N):

    num = int(eval(input()))

    count += int(prime_number(num))

print(count)

import math

def isPrimeNum(num):

    sqrtNum = int(math.sqrt(num)) + 1

    if(num == 2 or num == 3):

        return True

    elif(num % 2 == 0):

        return False

    else:

        for i in range(3, sqrtNum , 2):

            if(num % i == 0 ):

                return False

        return True

    

count = 0

N = int(eval(input()))

for i in range(N):

    num = int(eval(input()))

    if(isPrimeNum(num)):

        count += 1



print(count)

import math


def prime_number(num):
    if num == 1:
        return 0
    for i in range(2, int(math.sqrt(num)) + 1):
        if (num % i) == 0:
            return 0
    return 1


N = int(eval(input()))
count = 0
for i in range(0, N):
    num = int(eval(input()))
    count += int(prime_number(num))
print(count)

import math


def isPrimeNum(num):
    sqrtNum = int(math.sqrt(num)) + 1
    if num == 2 or num == 3:
        return True
    elif num % 2 == 0:
        return False
    else:
        for i in range(3, sqrtNum, 2):
            if num % i == 0:
                return False
        return True


count = 0
N = int(eval(input()))
for i in range(N):
    num = int(eval(input()))
    if isPrimeNum(num):
        count += 1
print(count)

-def prime_number(num): -    if num == 1: -        return 0 -    for i in range(2, int(math.sqrt(num)) + 1): -        if (num % i) == 0: -            return 0 -    return 1 +def isPrimeNum(num): +    sqrtNum = int(math.sqrt(num)) + 1 +    if num == 2 or num == 3: +        return True +    elif num % 2 == 0: +        return False +    else: +        for i in range(3, sqrtNum, 2): +            if num % i == 0: +                return False +        return True +count = 0 -count = 0 -for i in range(0, N): +for i in range(N): -    count += int(prime_number(num)) +    if isPrimeNum(num): +        count += 1