#coding:utf-8
import math

def isPrime(n):
    if n == 2:
        return True
    elif n % 2 == 0:
        return False
    else:
        for i in range(3,math.ceil(math.sqrt(n))+1,2):
            if n % i == 0:
                return False
        return True

n = int(input())
c = 0
for i in range(n):
    if isPrime(int(input())):
        c += 1

print(c) import math math def isPrime(n):
    if n == 2:
        return True
    elif n % 2 == 0:
        return False
    else:
        for i in range(3,math.ceil(math.sqrt(n))+1,2):
            if n % i == 0:
                return False
        return True isPrime if n == 2:
        return True
    elif n % 2 == 0:
        return False
    else:
        for i in range(3,math.ceil(math.sqrt(n))+1,2):
            if n % i == 0:
                return False
        return True n == 2 n 2 return True True elif n % 2 == 0:
        return False
     n % 2 == 0 n % 2 n 2 0 return False False for i in range(3,math.ceil(math.sqrt(n))+1,2):
            if n % i == 0:
                return False
         i range(3,math.ceil(math.sqrt(n))+1,2) range 3 math.ceil(math.sqrt(n))+1 math.ceil(math.sqrt(n)) math.ceil math ceil math.sqrt(n) math.sqrt math sqrt n 1 2 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 c = 0 c 0 for i in range(n):
    if isPrime(int(input())):
        c += 1 i range(n) range n if isPrime(int(input())):
        c += 1 isPrime(int(input())) isPrime int(input()) int input() input c += 1 c 1 print(c) print c n = int(input()) int(input()) n c += 1 1 c def isPrime(n):
    if n == 2:
        return True
    elif n % 2 == 0:
        return False
    else:
        for i in range(3,math.ceil(math.sqrt(n))+1,2):
            if n % i == 0:
                return False
        return True def isPrime(n):
    if n == 2:
        return True
    elif n % 2 == 0:
        return False
    else:
        for i in range(3,math.ceil(math.sqrt(n))+1,2):
            if n % i == 0:
                return False
        return True isPrime c = 0 0 c
#coding:utf-8
import math

def isPrime(n):
    if n == 2:
        return True
    elif n % 2 == 0:
        return False
    else:
        for i in range(3,math.ceil(math.sqrt(n))+1,2):
            if n % i == 0:
                return False
        return True

n = int(input())
c = 0
for i in range(n):
    if isPrime(int(input())):
        c += 1

print(c)