def check_prime_number(num):
	if num == 1:
		return 0

	for i in range(2,int(num**0.5)+1):	
		if num % i == 0:
			return 0
	return 1

if __name__ == '__main__':
	num = int(input())
	c = 0
	for i in range(num):
		d = int(input())
		c += check_prime_number(d)
	print(c)
