import math
n = int(raw_input())
cnt = 0
for i in range(n):
    j = 2
    num = int(raw_input())
    while j <= math.sqrt(num):
        if num % j == 0:
            break
        j+=1
    if j > math.sqrt(num):
        cnt+=1
print cnt import math math n = int(raw_input()) n int(raw_input()) int raw_input() raw_input cnt = 0 cnt 0 for i in range(n):
    j = 2
    num = int(raw_input())
    while j <= math.sqrt(num):
        if num % j == 0:
            break
        j+=1
    if j > math.sqrt(num):
        cnt+=1 i range(n) range n j = 2 j 2 num = int(raw_input()) num int(raw_input()) int raw_input() raw_input while j <= math.sqrt(num):
        if num % j == 0:
            break
        j+=1
     j <= math.sqrt(num) j math.sqrt(num) math.sqrt math sqrt num if num % j == 0:
            break
         num % j == 0 num % j num j 0 break j+=1 j 1 if j > math.sqrt(num):
        cnt+=1 j > math.sqrt(num) j math.sqrt(num) math.sqrt math sqrt num cnt+=1 cnt 1 print n = int(raw_input()) int(raw_input()) n j+=1 1 j cnt = 0 0 cnt j = 2 2 j num = int(raw_input()) int(raw_input()) num cnt+=1 1 cnt
import math
n = int(raw_input())
cnt = 0
for i in range(n):
    j = 2
    num = int(raw_input())
    while j <= math.sqrt(num):
        if num % j == 0:
            break
        j+=1
    if j > math.sqrt(num):
        cnt+=1
print cnt
