import math
n = int(input())
cnt = 0
for i in range(n):
    num = int(input())
    flag = True
    for j in range(2, int(math.sqrt(num))+1):
        if num%j == 0:
            flag = False
            break
    if flag:
        cnt+=1
print(cnt) import math math n = int(input()) n int(input()) int input() input cnt = 0 cnt 0 for i in range(n):
    num = int(input())
    flag = True
    for j in range(2, int(math.sqrt(num))+1):
        if num%j == 0:
            flag = False
            break
    if flag:
        cnt+=1 i range(n) range n num = int(input()) num int(input()) int input() input flag = True flag True for j in range(2, int(math.sqrt(num))+1):
        if num%j == 0:
            flag = False
            break
     j 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%j == 0:
            flag = False
            break
     num%j == 0 num%j num j 0 flag = False flag False break if flag:
        cnt+=1 flag cnt+=1 cnt 1 print(cnt) print cnt flag = False False flag cnt = 0 0 cnt cnt+=1 1 cnt flag = True True flag n = int(input()) int(input()) n num = int(input()) int(input()) num
import math
n = int(input())
cnt = 0
for i in range(n):
    num = int(input())
    flag = True
    for j in range(2, int(math.sqrt(num))+1):
        if num%j == 0:
            flag = False
            break
    if flag:
        cnt+=1
print(cnt)