import math

def isPrime(x):
    if(x == 1 ):
        return False

    n = int(math.sqrt(x))

    for i in range(2,n+1):
        if(x % i == 0):
            return False
    return True

n = int(input())
dataset = []
while (n > 0):
     dataset.append(int(input()))
     n -=1

prime_number = 0
for x in dataset:
    if(isPrime(x)):
        prime_number += 1

print(prime_number) import math math def isPrime(x):
    if(x == 1 ):
        return False

    n = int(math.sqrt(x))

    for i in range(2,n+1):
        if(x % i == 0):
            return False
    return True isPrime if(x == 1 ):
        return False

     x == 1 x 1 return False False n = int(math.sqrt(x)) n int(math.sqrt(x)) int math.sqrt(x) math.sqrt math sqrt x for i in range(2,n+1):
        if(x % i == 0):
            return False
     i range(2,n+1) range 2 n+1 n 1 if(x % i == 0):
            return False
     x % i == 0 x % i x i 0 return False False return True True x x n = int(input()) n int(input()) int input() input dataset = [] dataset [] while (n > 0):
     dataset.append(int(input()))
     n -=1 n > 0 n 0 dataset.append(int(input())) dataset.append dataset append int(input()) int input() input n -=1 n 1 prime_number = 0 prime_number 0 for x in dataset:
    if(isPrime(x)):
        prime_number += 1 x dataset if(isPrime(x)):
        prime_number += 1 isPrime(x) isPrime x prime_number += 1 prime_number 1 print(prime_number) print prime_number prime_number += 1 1 prime_number dataset = [] [] dataset prime_number = 0 0 prime_number n = int(input()) int(input()) n def isPrime(x):
    if(x == 1 ):
        return False

    n = int(math.sqrt(x))

    for i in range(2,n+1):
        if(x % i == 0):
            return False
    return True def isPrime(x):
    if(x == 1 ):
        return False

    n = int(math.sqrt(x))

    for i in range(2,n+1):
        if(x % i == 0):
            return False
    return True isPrime n -=1 1 n
import math

def isPrime(x):
    if(x == 1 ):
        return False

    n = int(math.sqrt(x))

    for i in range(2,n+1):
        if(x % i == 0):
            return False
    return True

n = int(input())
dataset = []
while (n > 0):
     dataset.append(int(input()))
     n -=1

prime_number = 0
for x in dataset:
    if(isPrime(x)):
        prime_number += 1

print(prime_number)