import math

def prime(a):
	if a==1:
		return 0
	n=2
	while n<=math.sqrt(a):
		if a%n==0:
			return 0
		n+=1
	return 1

N=int(input())

count=0
for i in range(N):
	a=int(input())
	count+=prime(a)
print(count) import math math def prime(a):
	if a==1:
		return 0
	n=2
	while n<=math.sqrt(a):
		if a%n==0:
			return 0
		n+=1
	return 1 prime if a==1:
		return 0
	 a==1 a 1 return 0 0 n=2 n 2 while n<=math.sqrt(a):
		if a%n==0:
			return 0
		n+=1
	 n<=math.sqrt(a) n math.sqrt(a) math.sqrt math sqrt a if a%n==0:
			return 0
		 a%n==0 a%n a n 0 return 0 0 n+=1 n 1 return 1 1 a a N=int(input()) N int(input()) int input() input count=0 count 0 for i in range(N):
	a=int(input())
	count+=prime(a) i range(N) range N a=int(input()) a int(input()) int input() input count+=prime(a) count prime(a) prime a print(count) print count N=int(input()) int(input()) N a=int(input()) int(input()) a count=0 0 count def prime(a):
	if a==1:
		return 0
	n=2
	while n<=math.sqrt(a):
		if a%n==0:
			return 0
		n+=1
	return 1 def prime(a):
	if a==1:
		return 0
	n=2
	while n<=math.sqrt(a):
		if a%n==0:
			return 0
		n+=1
	return 1 prime count+=prime(a) prime(a) count
import math

def prime(a):
	if a==1:
		return 0
	n=2
	while n<=math.sqrt(a):
		if a%n==0:
			return 0
		n+=1
	return 1

N=int(input())

count=0
for i in range(N):
	a=int(input())
	count+=prime(a)
print(count)