import math


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

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

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

	return True


num = int(input())
numbers = [int(input()) for i in range(num)]

count = 0
for i in range(num):
    if isPrime(numbers[i]) == True:
        count += 1
print(count) import math math def isPrime(n):
	if n == 2:
		return True

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

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

	return True isPrime if n == 2:
		return True

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

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

	 i <= math.sqrt(n) i math.sqrt(n) math.sqrt math sqrt n if n % i == 0:
			return False
		 n % i == 0 n % i n i 0 return False False i = i + 2 i i + 2 i 2 return True True n n num = int(input()) num int(input()) int input() input int(input()) for i in range(num) for i in range(num) i range(num) range num for i in range(num) int(input()) int input() input numbers = [int(input()) for i in range(num)] numbers [int(input()) for i in range(num)] count = 0 count 0 for i in range(num):
    if isPrime(numbers[i]) == True:
        count += 1 i range(num) range num if isPrime(numbers[i]) == True:
        count += 1 isPrime(numbers[i]) == True isPrime(numbers[i]) isPrime numbers[i] numbers i True count += 1 count 1 print(count) print count num = int(input()) int(input()) num count = 0 0 count count += 1 1 count numbers = [int(input()) for i in range(num)] [int(input()) for i in range(num)] numbers def isPrime(n):
	if n == 2:
		return True

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

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

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

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

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

	return True isPrime
import math


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

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

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

	return True


num = int(input())
numbers = [int(input()) for i in range(num)]

count = 0
for i in range(num):
    if isPrime(numbers[i]) == True:
        count += 1
print(count)