import math
n = int(input())
count = 0
for i in range(n):
    t = int(input())
    a = int(t ** (1 / 2))
    end = 0
    for j in range(2, a + 1):
        if t % j == 0:
            end = 1
            break
    if end == 0:
        count += 1
print(count) import math math n = int(input()) n int(input()) int input() input count = 0 count 0 for i in range(n):
    t = int(input())
    a = int(t ** (1 / 2))
    end = 0
    for j in range(2, a + 1):
        if t % j == 0:
            end = 1
            break
    if end == 0:
        count += 1 i range(n) range n t = int(input()) t int(input()) int input() input a = int(t ** (1 / 2)) a int(t ** (1 / 2)) int t ** (1 / 2) t 1 / 2 1 2 end = 0 end 0 for j in range(2, a + 1):
        if t % j == 0:
            end = 1
            break
     j range(2, a + 1) range 2 a + 1 a 1 if t % j == 0:
            end = 1
            break
     t % j == 0 t % j t j 0 end = 1 end 1 break if end == 0:
        count += 1 end == 0 end 0 count += 1 count 1 print(count) print count a = int(t ** (1 / 2)) int(t ** (1 / 2)) a t = int(input()) int(input()) t end = 0 0 end count += 1 1 count n = int(input()) int(input()) n count = 0 0 count end = 1 1 end
import math
n = int(input())
count = 0
for i in range(n):
    t = int(input())
    a = int(t ** (1 / 2))
    end = 0
    for j in range(2, a + 1):
        if t % j == 0:
            end = 1
            break
    if end == 0:
        count += 1
print(count)
