import math
N = int(input())
count = 0
for _ in range(N):
    m = int(input())
    rm = int(math.sqrt(m))
    flag = 0
    for i in range(2,rm+1):
        if m %i ==0:
            flag = 1
            break
    if flag ==0 :count=count +1

print(count) import math math N = int(input()) N int(input()) int input() input count = 0 count 0 for _ in range(N):
    m = int(input())
    rm = int(math.sqrt(m))
    flag = 0
    for i in range(2,rm+1):
        if m %i ==0:
            flag = 1
            break
    if flag ==0 :count=count +1 _ range(N) range N m = int(input()) m int(input()) int input() input rm = int(math.sqrt(m)) rm int(math.sqrt(m)) int math.sqrt(m) math.sqrt math sqrt m flag = 0 flag 0 for i in range(2,rm+1):
        if m %i ==0:
            flag = 1
            break
     i range(2,rm+1) range 2 rm+1 rm 1 if m %i ==0:
            flag = 1
            break
     m %i ==0 m %i m i 0 flag = 1 flag 1 break if flag ==0 :count=coun flag ==0 flag 0 print(count) print count N = int(input()) int(input()) N rm = int(math.sqrt(m)) int(math.sqrt(m)) rm flag = 1 1 flag count = 0 0 count m = int(input()) int(input()) m flag = 0 0 flag
import math
N = int(input())
count = 0
for _ in range(N):
    m = int(input())
    rm = int(math.sqrt(m))
    flag = 0
    for i in range(2,rm+1):
        if m %i ==0:
            flag = 1
            break
    if flag ==0 :count=count +1

print(count)