import sys
import math

count = 0

num_list = []

for line in sys.stdin.readlines():
    num_list.append(int(line.strip()))

num_list.remove(num_list[0])

for num in num_list:
        flag = 0
        for i in range(2, int(math.sqrt(num)) + 1):
            if num % i == 0:
                flag = 1
                break
        if flag == 0:
            count += 1

print count import sys sys import math math count = 0 count 0 num_list = [] num_list [] for line in sys.stdin.readlines():
    num_list.append(int(line.strip())) line sys.stdin.readlines() sys.stdin.readlines sys.stdin sys stdin readlines num_list.append(int(line.strip())) num_list.append num_list append int(line.strip()) int line.strip() line.strip line strip num_list.remove(num_list[0]) num_list.remove num_list remove num_list[0] num_list 0 for num in num_list:
        flag = 0
        for i in range(2, int(math.sqrt(num)) + 1):
            if num % i == 0:
                flag = 1
                break
        if flag == 0:
            count += 1 num num_list flag = 0 flag 0 for i in range(2, int(math.sqrt(num)) + 1):
            if num % i == 0:
                flag = 1
                break
         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:
                flag = 1
                break
         num % i == 0 num % i num i 0 flag = 1 flag 1 break if flag == 0:
            count += 1 flag == 0 flag 0 count += 1 count 1 print count = 0 0 count flag = 1 1 flag count += 1 1 count flag = 0 0 flag num_list = [] [] num_list
import sys
import math

count = 0

num_list = []

for line in sys.stdin.readlines():
    num_list.append(int(line.strip()))

num_list.remove(num_list[0])

for num in num_list:
        flag = 0
        for i in range(2, int(math.sqrt(num)) + 1):
            if num % i == 0:
                flag = 1
                break
        if flag == 0:
            count += 1

print count