#coding: UTF-8

import sys
import math

class Algo:
  @staticmethod
  def is_prime(l):
    ans = 0
    for n in l:
      if n == 2:
        ans += 1
      else:
        for i in range(2,int(math.sqrt(n))+2):
          if n%i == 0:
            ans += 1
    print(ans)

N = int(input())
L = []
for i in range(0,N):
  L.append(int(input()))
Algo.is_prime(L)