import math
cnt = 0
for i in range(int(input())):
    x = int(input())
    flg = False # なんらかの数で割り切れるかどうか
    if x == 1:
        continue
    if x == 2:
        cnt += 1
        continue
    for k in range(2, math.floor(math.sqrt(x))+1):
        if not(x % k):
            flg = True
            break
    if not flg:
        cnt += 1
print(cnt) import math math cnt = 0 cnt 0 for i in range(int(input())):
    x = int(input())
    flg = False # なんらかの数で割り切れるかどうか
    if x == 1:
        continue
    if x == 2:
        cnt += 1
        continue
    for k in range(2, math.floor(math.sqrt(x))+1):
        if not(x % k):
            flg = True
            break
    if not flg:
        cnt += 1 i range(int(input())) range int(input()) int input() input x = int(input()) x int(input()) int input() input flg = False flg False if x == 1:
        continue
     x == 1 x 1 continue if x == 2:
        cnt += 1
        continue
     x == 2 x 2 cnt += 1 cnt 1 continue for k in range(2, math.floor(math.sqrt(x))+1):
        if not(x % k):
            flg = True
            break
     k range(2, math.floor(math.sqrt(x))+1) range 2 math.floor(math.sqrt(x))+1 math.floor(math.sqrt(x)) math.floor math floor math.sqrt(x) math.sqrt math sqrt x 1 if not(x % k):
            flg = True
            break
     not(x % k) x % k x k flg = True flg True break if not flg:
        cnt += 1 not flg flg cnt += 1 cnt 1 print(cnt) print cnt flg = False False flg cnt += 1 1 cnt cnt = 0 0 cnt x = int(input()) int(input()) x cnt += 1 1 cnt flg = True True flg
import math
cnt = 0
for i in range(int(input())):
    x = int(input())
    flg = False # なんらかの数で割り切れるかどうか
    if x == 1:
        continue
    if x == 2:
        cnt += 1
        continue
    for k in range(2, math.floor(math.sqrt(x))+1):
        if not(x % k):
            flg = True
            break
    if not flg:
        cnt += 1
print(cnt)
