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(input())
count = 0
for i in range(0,N):
    num = int(input())
    count += int(prime_number(num))
print(count) import math 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 prime_number if num == 1 :
        return 0
     num == 1 num 1 return 0 0 for i in range(2,int(math.sqrt(num))+1):
        if (num % i) == 0:
            return 0
     i range(2,int(math.sqrt(num))+1) range 2 int(math.sqrt(num))+1 int(math.sqrt(num)) int math.sqrt(num) math.sqrt math sqrt num 1 if (num % i) == 0:
            return 0
     (num % i) == 0 num % i num i 0 return 0 0 return 1 1 num num N =int(input()) N int(input()) int input() input count = 0 count 0 for i in range(0,N):
    num = int(input())
    count += int(prime_number(num)) i range(0,N) range 0 N num = int(input()) num int(input()) int input() input count += int(prime_number(num)) count int(prime_number(num)) int prime_number(num) prime_number num print(count) print count count += int(prime_number(num)) int(prime_number(num)) 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 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 prime_number N =int(input()) int(input()) N count = 0 0 count num = int(input()) int(input()) num
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(input())
count = 0
for i in range(0,N):
    num = int(input())
    count += int(prime_number(num))
print(count)
