#coding:utf-8
import math

n = int(input())
prime_count = 0
for i in range(n):
    x = int(input())
    div = 1
    div_count = 0

    while div <= math.sqrt(x) and div_count < 3:
        if x % div == 0 and div == math.sqrt(x):
             div_count += 1
        elif x % div == 0 and div != math.sqrt(x):
             div_count += 2
        div += 1

    if div_count == 2:
        prime_count += 1

print(prime_count) import math math n = int(input()) n int(input()) int input() input prime_count = 0 prime_count 0 for i in range(n):
    x = int(input())
    div = 1
    div_count = 0

    while div <= math.sqrt(x) and div_count < 3:
        if x % div == 0 and div == math.sqrt(x):
             div_count += 1
        elif x % div == 0 and div != math.sqrt(x):
             div_count += 2
        div += 1

    if div_count == 2:
        prime_count += 1 i range(n) range n x = int(input()) x int(input()) int input() input div = 1 div 1 div_count = 0 div_count 0 while div <= math.sqrt(x) and div_count < 3:
        if x % div == 0 and div == math.sqrt(x):
             div_count += 1
        elif x % div == 0 and div != math.sqrt(x):
             div_count += 2
        div += 1

     div <= math.sqrt(x) and div_count < 3 div <= math.sqrt(x) div math.sqrt(x) math.sqrt math sqrt x div_count < 3 div_count 3 if x % div == 0 and div == math.sqrt(x):
             div_count += 1
        elif x % div == 0 and div != math.sqrt(x):
             div_count += 2
         x % div == 0 and div == math.sqrt(x) x % div == 0 x % div x div 0 div == math.sqrt(x) div math.sqrt(x) math.sqrt math sqrt x div_count += 1 div_count 1 elif x % div == 0 and div != math.sqrt(x):
             div_count += 2
         x % div == 0 and div != math.sqrt(x) x % div == 0 x % div x div 0 div != math.sqrt(x) div math.sqrt(x) math.sqrt math sqrt x div_count += 2 div_count 2 div += 1 div 1 if div_count == 2:
        prime_count += 1 div_count == 2 div_count 2 prime_count += 1 prime_count 1 print(prime_count) print prime_count div_count = 0 0 div_count prime_count = 0 0 prime_count div = 1 1 div prime_count += 1 1 prime_count x = int(input()) int(input()) x n = int(input()) int(input()) n div_count += 2 2 div_count div_count += 1 1 div_count div += 1 1 div
#coding:utf-8
import math

n = int(input())
prime_count = 0
for i in range(n):
    x = int(input())
    div = 1
    div_count = 0

    while div <= math.sqrt(x) and div_count < 3:
        if x % div == 0 and div == math.sqrt(x):
             div_count += 1
        elif x % div == 0 and div != math.sqrt(x):
             div_count += 2
        div += 1

    if div_count == 2:
        prime_count += 1

print(prime_count)