import math

def isprime(x):
	sq = int(math.sqrt(x))
	for i in range(2, sq + 1):
		if x % i == 0:
			return False
	return x != 1

array = []
N = int(raw_input())
for i in range(0, N):
	array.append(int(raw_input()))

count = 0
for i in array:
	if isprime(i):
		count += 1
print count import math math def isprime(x):
	sq = int(math.sqrt(x))
	for i in range(2, sq + 1):
		if x % i == 0:
			return False
	return x != 1 isprime sq = int(math.sqrt(x)) sq int(math.sqrt(x)) int math.sqrt(x) math.sqrt math sqrt x for i in range(2, sq + 1):
		if x % i == 0:
			return False
	 i range(2, sq + 1) range 2 sq + 1 sq 1 if x % i == 0:
			return False
	 x % i == 0 x % i x i 0 return False False return x != 1 x != 1 x 1 x x array = [] array [] N = int(raw_input()) N int(raw_input()) int raw_input() raw_input for i in range(0, N):
	array.append(int(raw_input())) i range(0, N) range 0 N array.append(int(raw_input())) array.append array append int(raw_input()) int raw_input() raw_input count = 0 count 0 for i in array:
	if isprime(i):
		count += 1 i array if isprime(i):
		count += 1 isprime(i) isprime i count += 1 count 1 print N = int(raw_input()) int(raw_input()) N count = 0 0 count array = [] [] array def isprime(x):
	sq = int(math.sqrt(x))
	for i in range(2, sq + 1):
		if x % i == 0:
			return False
	return x != 1 def isprime(x):
	sq = int(math.sqrt(x))
	for i in range(2, sq + 1):
		if x % i == 0:
			return False
	return x != 1 isprime count += 1 1 count
import math

def isprime(x):
	sq = int(math.sqrt(x))
	for i in range(2, sq + 1):
		if x % i == 0:
			return False
	return x != 1

array = []
N = int(raw_input())
for i in range(0, N):
	array.append(int(raw_input()))

count = 0
for i in array:
	if isprime(i):
		count += 1
print count