# -*- coding: utf-8 -*-
import math

def prime_number_identifier(num):
    for candidate in range(2, int(math.sqrt(num)) + 1):
        if num % candidate == 0:
            return False
    return True


input_num = int(raw_input())
counter = 0
found_number = 0
while counter < input_num:
    candidate_number = int(raw_input())
    if prime_number_identifier(candidate_number):
        found_number += 1
    counter += 1

print found_number import math math def prime_number_identifier(num):
    for candidate in range(2, int(math.sqrt(num)) + 1):
        if num % candidate == 0:
            return False
    return True prime_number_identifier for candidate in range(2, int(math.sqrt(num)) + 1):
        if num % candidate == 0:
            return False
     candidate range(2, int(math.sqrt(num)) + 1) range 2 int(math.sqrt(num)) + 1 int(math.sqrt(num)) int math.sqrt(num) math.sqrt math sqrt num 1 if num % candidate == 0:
            return False
     num % candidate == 0 num % candidate num candidate 0 return False False return True True num num input_num = int(raw_input()) input_num int(raw_input()) int raw_input() raw_input counter = 0 counter 0 found_number = 0 found_number 0 while counter < input_num:
    candidate_number = int(raw_input())
    if prime_number_identifier(candidate_number):
        found_number += 1
    counter += 1 counter < input_num counter input_num candidate_number = int(raw_input()) candidate_number int(raw_input()) int raw_input() raw_input if prime_number_identifier(candidate_number):
        found_number += 1
     prime_number_identifier(candidate_number) prime_number_identifier candidate_number found_number += 1 found_number 1 counter += 1 counter 1 print counter += 1 1 counter def prime_number_identifier(num):
    for candidate in range(2, int(math.sqrt(num)) + 1):
        if num % candidate == 0:
            return False
    return True def prime_number_identifier(num):
    for candidate in range(2, int(math.sqrt(num)) + 1):
        if num % candidate == 0:
            return False
    return True prime_number_identifier input_num = int(raw_input()) int(raw_input()) input_num counter = 0 0 counter candidate_number = int(raw_input()) int(raw_input()) candidate_number found_number += 1 1 found_number found_number = 0 0 found_number
# -*- coding: utf-8 -*-
import math

def prime_number_identifier(num):
    for candidate in range(2, int(math.sqrt(num)) + 1):
        if num % candidate == 0:
            return False
    return True


input_num = int(raw_input())
counter = 0
found_number = 0
while counter < input_num:
    candidate_number = int(raw_input())
    if prime_number_identifier(candidate_number):
        found_number += 1
    counter += 1

print found_number