import math
n = input()
c = 0


for i in range(int(n)):
    x = int(input())
    if x == 1:
        x = 0
    for j in range(2,math.floor(math.sqrt(float(x)))+ 1):
        if x % j == 0:
            x = 0
            break
    if x != 0:
        c += 1	
print(c) import math math n = input() n input() input c = 0 c 0 for i in range(int(n)):
    x = int(input())
    if x == 1:
        x = 0
    for j in range(2,math.floor(math.sqrt(float(x)))+ 1):
        if x % j == 0:
            x = 0
            break
    if x != 0:
        c += 1	 i range(int(n)) range int(n) int n x = int(input()) x int(input()) int input() input if x == 1:
        x = 0
     x == 1 x 1 x = 0 x 0 for j in range(2,math.floor(math.sqrt(float(x)))+ 1):
        if x % j == 0:
            x = 0
            break
     j range(2,math.floor(math.sqrt(float(x)))+ 1) range 2 math.floor(math.sqrt(float(x)))+ 1 math.floor(math.sqrt(float(x))) math.floor math floor math.sqrt(float(x)) math.sqrt math sqrt float(x) float x 1 if x % j == 0:
            x = 0
            break
     x % j == 0 x % j x j 0 x = 0 x 0 break if x != 0:
        c += 1	 x != 0 x 0 c += 1 c 1 print(c) print c n = input() input() n x = int(input()) int(input()) x c += 1 1 c c = 0 0 c x = 0 0 x x = 0 0 x
import math
n = input()
c = 0


for i in range(int(n)):
    x = int(input())
    if x == 1:
        x = 0
    for j in range(2,math.floor(math.sqrt(float(x)))+ 1):
        if x % j == 0:
            x = 0
            break
    if x != 0:
        c += 1	
print(c)