import math

n = int(input())
prime = n

for i in range(n):
    num = int(input())
    for j in range(2,int(math.sqrt(num)+1)):
      if num % j == 0:
       prime -= 1
       break

print(prime) import math math n = int(input()) n int(input()) int input() input prime = n prime n for i in range(n):
    num = int(input())
    for j in range(2,int(math.sqrt(num)+1)):
      if num % j == 0:
       prime -= 1
       break i range(n) range n num = int(input()) num int(input()) int input() input for j in range(2,int(math.sqrt(num)+1)):
      if num % j == 0:
       prime -= 1
       break j range(2,int(math.sqrt(num)+1)) range 2 int(math.sqrt(num)+1) int math.sqrt(num)+1 math.sqrt(num) math.sqrt math sqrt num 1 if num % j == 0:
       prime -= 1
       break num % j == 0 num % j num j 0 prime -= 1 prime 1 break print(prime) print prime n = int(input()) int(input()) n prime = n n prime num = int(input()) int(input()) num prime -= 1 1 prime
import math

n = int(input())
prime = n

for i in range(n):
    num = int(input())
    for j in range(2,int(math.sqrt(num)+1)):
      if num % j == 0:
       prime -= 1
       break

print(prime)