# -*- coding : utf-8 -*-

import math

def is_prime_number(num):
    if num == 2:
        return True
    if num < 2 or num % 2 == 0:
        return False
    i = 3
    while i <= math.sqrt(num):
        if num % i == 0:
            return False
        i = i + 2
    return True

list_num = int(input())
count_prime = 0
for i in range(list_num):
    num = int(input())
    if is_prime_number(num):
        count_prime = count_prime + 1
print(count_prime) import math math def is_prime_number(num):
    if num == 2:
        return True
    if num < 2 or num % 2 == 0:
        return False
    i = 3
    while i <= math.sqrt(num):
        if num % i == 0:
            return False
        i = i + 2
    return True is_prime_number if num == 2:
        return True
     num == 2 num 2 return True True if num < 2 or num % 2 == 0:
        return False
     num < 2 or num % 2 == 0 num < 2 num 2 num % 2 == 0 num % 2 num 2 0 return False False i = 3 i 3 while i <= math.sqrt(num):
        if num % i == 0:
            return False
        i = i + 2
     i <= math.sqrt(num) i math.sqrt(num) math.sqrt math sqrt num if num % i == 0:
            return False
         num % i == 0 num % i num i 0 return False False i = i + 2 i i + 2 i 2 return True True num num list_num = int(input()) list_num int(input()) int input() input count_prime = 0 count_prime 0 for i in range(list_num):
    num = int(input())
    if is_prime_number(num):
        count_prime = count_prime + 1 i range(list_num) range list_num num = int(input()) num int(input()) int input() input if is_prime_number(num):
        count_prime = count_prime + 1 is_prime_number(num) is_prime_number num count_prime = count_prime + 1 count_prime count_prime + 1 count_prime 1 print(count_prime) print count_prime count_prime = count_prime + 1 count_prime + 1 count_prime num = int(input()) int(input()) num def is_prime_number(num):
    if num == 2:
        return True
    if num < 2 or num % 2 == 0:
        return False
    i = 3
    while i <= math.sqrt(num):
        if num % i == 0:
            return False
        i = i + 2
    return True def is_prime_number(num):
    if num == 2:
        return True
    if num < 2 or num % 2 == 0:
        return False
    i = 3
    while i <= math.sqrt(num):
        if num % i == 0:
            return False
        i = i + 2
    return True is_prime_number list_num = int(input()) int(input()) list_num count_prime = 0 0 count_prime
# -*- coding : utf-8 -*-

import math

def is_prime_number(num):
    if num == 2:
        return True
    if num < 2 or num % 2 == 0:
        return False
    i = 3
    while i <= math.sqrt(num):
        if num % i == 0:
            return False
        i = i + 2
    return True

list_num = int(input())
count_prime = 0
for i in range(list_num):
    num = int(input())
    if is_prime_number(num):
        count_prime = count_prime + 1
print(count_prime)