def isPrime(num):
	if num <= 1:
		return False

	elif num == 2 or num == 3:
		return True

	elif num % 2 == 0:
		return False

	else:
		count = 3

		while True:
			if num % count and count ** 2 <= num:
				count += 2
				continue

			elif num % count == 0:
				return False

			else:
				break

		return True


if __name__ == '__main__':
	count = 0
	N = int(input())
	
	for i in range(N):
		i = int(input())

		if isPrime(i):
			count += 1

	print(count)
 def isPrime(num):
	if num <= 1:
		return False

	elif num == 2 or num == 3:
		return True

	elif num % 2 == 0:
		return False

	else:
		count = 3

		while True:
			if num % count and count ** 2 <= num:
				count += 2
				continue

			elif num % count == 0:
				return False

			else:
				break

		return True isPrime if num <= 1:
		return False

	elif num == 2 or num == 3:
		return True

	elif num % 2 == 0:
		return False

	else:
		count = 3

		while True:
			if num % count and count ** 2 <= num:
				count += 2
				continue

			elif num % count == 0:
				return False

			else:
				break

		return True num <= 1 num 1 return False False elif num == 2 or num == 3:
		return True

	 num == 2 or num == 3 num == 2 num 2 num == 3 num 3 return True True elif num % 2 == 0:
		return False

	 num % 2 == 0 num % 2 num 2 0 return False False count = 3 count 3 while True:
			if num % count and count ** 2 <= num:
				count += 2
				continue

			elif num % count == 0:
				return False

			else:
				break

		 True if num % count and count ** 2 <= num:
				count += 2
				continue

			elif num % count == 0:
				return False

			else:
				break

		 num % count and count ** 2 <= num num % count num count count ** 2 <= num count ** 2 count 2 num count += 2 count 2 continue elif num % count == 0:
				return False

			 num % count == 0 num % count num count 0 return False False break return True True num num if __name__ == '__main__':
	count = 0
	N = int(input())
	
	for i in range(N):
		i = int(input())

		if isPrime(i):
			count += 1

	print(count) __name__ == '__main__' __name__ '__main__' count = 0 count 0 N = int(input()) N int(input()) int input() input for i in range(N):
		i = int(input())

		if isPrime(i):
			count += 1

	 i range(N) range N i = int(input()) i int(input()) int input() input if isPrime(i):
			count += 1

	 isPrime(i) isPrime i count += 1 count 1 print(count) print count count = 0 0 count def isPrime(num):
	if num <= 1:
		return False

	elif num == 2 or num == 3:
		return True

	elif num % 2 == 0:
		return False

	else:
		count = 3

		while True:
			if num % count and count ** 2 <= num:
				count += 2
				continue

			elif num % count == 0:
				return False

			else:
				break

		return True def isPrime(num):
	if num <= 1:
		return False

	elif num == 2 or num == 3:
		return True

	elif num % 2 == 0:
		return False

	else:
		count = 3

		while True:
			if num % count and count ** 2 <= num:
				count += 2
				continue

			elif num % count == 0:
				return False

			else:
				break

		return True isPrime N = int(input()) int(input()) N count += 1 1 count i = int(input()) int(input()) i
def isPrime(num):
	if num <= 1:
		return False

	elif num == 2 or num == 3:
		return True

	elif num % 2 == 0:
		return False

	else:
		count = 3

		while True:
			if num % count and count ** 2 <= num:
				count += 2
				continue

			elif num % count == 0:
				return False

			else:
				break

		return True


if __name__ == '__main__':
	count = 0
	N = int(input())
	
	for i in range(N):
		i = int(input())

		if isPrime(i):
			count += 1

	print(count)

