import math
n = input()
prime_count = 0
is_prime = 1

for i in range(0,n):
	is_prime = 1
	prime_check_number = input()
	if prime_check_number == 2:
		prime_count = prime_count + 1
		continue
	elif prime_check_number == 1 or prime_check_number % 2 == 0:
		continue
	else:
		prime_check_number_sqrt = int(math.sqrt(prime_check_number))
		for j in range(3,prime_check_number_sqrt+1,2):
			if prime_check_number % j == 0:
				is_prime = 0
				break

	if is_prime == 1:
		prime_count = prime_count + 1

print(prime_count) import math math n = input() n input() input prime_count = 0 prime_count 0 is_prime = 1 is_prime 1 for i in range(0,n):
	is_prime = 1
	prime_check_number = input()
	if prime_check_number == 2:
		prime_count = prime_count + 1
		continue
	elif prime_check_number == 1 or prime_check_number % 2 == 0:
		continue
	else:
		prime_check_number_sqrt = int(math.sqrt(prime_check_number))
		for j in range(3,prime_check_number_sqrt+1,2):
			if prime_check_number % j == 0:
				is_prime = 0
				break

	if is_prime == 1:
		prime_count = prime_count + 1 i range(0,n) range 0 n is_prime = 1 is_prime 1 prime_check_number = input() prime_check_number input() input if prime_check_number == 2:
		prime_count = prime_count + 1
		continue
	elif prime_check_number == 1 or prime_check_number % 2 == 0:
		continue
	else:
		prime_check_number_sqrt = int(math.sqrt(prime_check_number))
		for j in range(3,prime_check_number_sqrt+1,2):
			if prime_check_number % j == 0:
				is_prime = 0
				break

	 prime_check_number == 2 prime_check_number 2 prime_count = prime_count + 1 prime_count prime_count + 1 prime_count 1 continue elif prime_check_number == 1 or prime_check_number % 2 == 0:
		continue
	 prime_check_number == 1 or prime_check_number % 2 == 0 prime_check_number == 1 prime_check_number 1 prime_check_number % 2 == 0 prime_check_number % 2 prime_check_number 2 0 continue prime_check_number_sqrt = int(math.sqrt(prime_check_number)) prime_check_number_sqrt int(math.sqrt(prime_check_number)) int math.sqrt(prime_check_number) math.sqrt math sqrt prime_check_number for j in range(3,prime_check_number_sqrt+1,2):
			if prime_check_number % j == 0:
				is_prime = 0
				break

	 j range(3,prime_check_number_sqrt+1,2) range 3 prime_check_number_sqrt+1 prime_check_number_sqrt 1 2 if prime_check_number % j == 0:
				is_prime = 0
				break

	 prime_check_number % j == 0 prime_check_number % j prime_check_number j 0 is_prime = 0 is_prime 0 break if is_prime == 1:
		prime_count = prime_count + 1 is_prime == 1 is_prime 1 prime_count = prime_count + 1 prime_count prime_count + 1 prime_count 1 print(prime_count) print prime_count prime_count = prime_count + 1 prime_count + 1 prime_count prime_count = prime_count + 1 prime_count + 1 prime_count is_prime = 1 1 is_prime prime_check_number = input() input() prime_check_number is_prime = 1 1 is_prime prime_check_number_sqrt = int(math.sqrt(prime_check_number)) int(math.sqrt(prime_check_number)) prime_check_number_sqrt is_prime = 0 0 is_prime n = input() input() n prime_count = 0 0 prime_count
import math
n = input()
prime_count = 0
is_prime = 1

for i in range(0,n):
	is_prime = 1
	prime_check_number = input()
	if prime_check_number == 2:
		prime_count = prime_count + 1
		continue
	elif prime_check_number == 1 or prime_check_number % 2 == 0:
		continue
	else:
		prime_check_number_sqrt = int(math.sqrt(prime_check_number))
		for j in range(3,prime_check_number_sqrt+1,2):
			if prime_check_number % j == 0:
				is_prime = 0
				break

	if is_prime == 1:
		prime_count = prime_count + 1

print(prime_count)
