import math

def isPrime(x):
	if x == 2:
		return True

	if x < 2 or x % 2 == 0:
		return False

	i = 3
	while i <= math.sqrt(x):
		if x % i == 0:
			return False
		i = i + 2

	return True

if __name__ == '__main__':
	n = int(input())
	A = [int(input()) for i in range(n)]

	cnt = 0
	for i in range(n):
		if isPrime(A[i]) == True:
			cnt = cnt + 1

	print(cnt) import math math def isPrime(x):
	if x == 2:
		return True

	if x < 2 or x % 2 == 0:
		return False

	i = 3
	while i <= math.sqrt(x):
		if x % i == 0:
			return False
		i = i + 2

	return True isPrime if x == 2:
		return True

	 x == 2 x 2 return True True if x < 2 or x % 2 == 0:
		return False

	 x < 2 or x % 2 == 0 x < 2 x 2 x % 2 == 0 x % 2 x 2 0 return False False i = 3 i 3 while i <= math.sqrt(x):
		if x % i == 0:
			return False
		i = i + 2

	 i <= math.sqrt(x) i math.sqrt(x) math.sqrt math sqrt x if x % i == 0:
			return False
		 x % i == 0 x % i x i 0 return False False i = i + 2 i i + 2 i 2 return True True x x if __name__ == '__main__':
	n = int(input())
	A = [int(input()) for i in range(n)]

	cnt = 0
	for i in range(n):
		if isPrime(A[i]) == True:
			cnt = cnt + 1

	print(cnt) __name__ == '__main__' __name__ '__main__' n = int(input()) n int(input()) int input() input int(input()) for i in range(n) for i in range(n) i range(n) range n for i in range(n) int(input()) int input() input A = [int(input()) for i in range(n)] A [int(input()) for i in range(n)] cnt = 0 cnt 0 for i in range(n):
		if isPrime(A[i]) == True:
			cnt = cnt + 1

	 i range(n) range n if isPrime(A[i]) == True:
			cnt = cnt + 1

	 isPrime(A[i]) == True isPrime(A[i]) isPrime A[i] A i True cnt = cnt + 1 cnt cnt + 1 cnt 1 print(cnt) print cnt n = int(input()) int(input()) n cnt = 0 0 cnt cnt = cnt + 1 cnt + 1 cnt def isPrime(x):
	if x == 2:
		return True

	if x < 2 or x % 2 == 0:
		return False

	i = 3
	while i <= math.sqrt(x):
		if x % i == 0:
			return False
		i = i + 2

	return True def isPrime(x):
	if x == 2:
		return True

	if x < 2 or x % 2 == 0:
		return False

	i = 3
	while i <= math.sqrt(x):
		if x % i == 0:
			return False
		i = i + 2

	return True isPrime A = [int(input()) for i in range(n)] [int(input()) for i in range(n)] A
import math

def isPrime(x):
	if x == 2:
		return True

	if x < 2 or x % 2 == 0:
		return False

	i = 3
	while i <= math.sqrt(x):
		if x % i == 0:
			return False
		i = i + 2

	return True

if __name__ == '__main__':
	n = int(input())
	A = [int(input()) for i in range(n)]

	cnt = 0
	for i in range(n):
		if isPrime(A[i]) == True:
			cnt = cnt + 1

	print(cnt)