#coding: UTF-8
def isPrime(n):
  if n == 1:
    return False
  import math
  m = math.floor(math.sqrt(n))
  for i in range(2,m+1):
    if n % i == 0:
      return False
  return True

n = int(input())
count = 0
for j in range(n):
  m = int(input())
  if isPrime(m):
    count += 1

print(count) def isPrime(n):
  if n == 1:
    return False
  import math
  m = math.floor(math.sqrt(n))
  for i in range(2,m+1):
    if n % i == 0:
      return False
  return True isPrime if n == 1:
    return False
   n == 1 n 1 return False False import math math m = math.floor(math.sqrt(n)) m math.floor(math.sqrt(n)) math.floor math floor math.sqrt(n) math.sqrt math sqrt n for i in range(2,m+1):
    if n % i == 0:
      return False
   i range(2,m+1) range 2 m+1 m 1 if n % i == 0:
      return False
   n % i == 0 n % i n i 0 return False False return True True n n n = int(input()) n int(input()) int input() input count = 0 count 0 for j in range(n):
  m = int(input())
  if isPrime(m):
    count += 1 j range(n) range n m = int(input()) m int(input()) int input() input if isPrime(m):
    count += 1 isPrime(m) isPrime m count += 1 count 1 print(count) print count def isPrime(n):
  if n == 1:
    return False
  import math
  m = math.floor(math.sqrt(n))
  for i in range(2,m+1):
    if n % i == 0:
      return False
  return True def isPrime(n):
  if n == 1:
    return False
  import math
  m = math.floor(math.sqrt(n))
  for i in range(2,m+1):
    if n % i == 0:
      return False
  return True isPrime count = 0 0 count n = int(input()) int(input()) n count += 1 1 count m = int(input()) int(input()) m
#coding: UTF-8
def isPrime(n):
  if n == 1:
    return False
  import math
  m = math.floor(math.sqrt(n))
  for i in range(2,m+1):
    if n % i == 0:
      return False
  return True

n = int(input())
count = 0
for j in range(n):
  m = int(input())
  if isPrime(m):
    count += 1

print(count)
