import math
c = 0
n = int(input())
for _ in range(n):
	t = int(input())
	for i in range(2,int(math.sqrt(t)+1)):
		if t%i==0:
			break
	else:
		c+=1
print(c) import math math c = 0 c 0 n = int(input()) n int(input()) int input() input for _ in range(n):
	t = int(input())
	for i in range(2,int(math.sqrt(t)+1)):
		if t%i==0:
			break
	else:
		c+=1 _ range(n) range n t = int(input()) t int(input()) int input() input for i in range(2,int(math.sqrt(t)+1)):
		if t%i==0:
			break
	else:
		c+=1 i range(2,int(math.sqrt(t)+1)) range 2 int(math.sqrt(t)+1) int math.sqrt(t)+1 math.sqrt(t) math.sqrt math sqrt t 1 if t%i==0:
			break
	 t%i==0 t%i t i 0 break c+=1 c 1 print(c) print c c = 0 0 c c+=1 1 c n = int(input()) int(input()) n t = int(input()) int(input()) t
import math
c = 0
n = int(input())
for _ in range(n):
	t = int(input())
	for i in range(2,int(math.sqrt(t)+1)):
		if t%i==0:
			break
	else:
		c+=1
print(c)