def isPrime( x ):

	if 2 == x or 3 == x:

		return True

	if 0 == x&1:

		return False

	i = 3 

	while  i*i <= x:

		if 0 == x%i:

			return False

		i += 1

	return True





n = int( input( ) )

nums = []

while 0 < n:

	nums.append( int( input( ) ) )

	n -= 1

cnt = 0

for num in nums:

	if isPrime( num  ):

		cnt += 1



print( cnt )
import math



def isPrime( x ):

	if 2 == x or 3 == x:

		return True

	if 0 == x&1:

		return False

	i = 3

	limit = math.sqrt( x )

	while  i <= limit:

		if 0 == x%i:

			return False

		i += 2

	return True

 

 

n = int( input( ) )

nums = []

i = 0

while i < n:

    nums.append( int( input( ) ) )

    i += 1

cnt = i = 0

for val in nums:

    if isPrime( val ):

        cnt += 1

 

print( cnt )
def isPrime(x):
    if 2 == x or 3 == x:
        return True
    if 0 == x & 1:
        return False
    i = 3
    while i * i <= x:
        if 0 == x % i:
            return False
        i += 1
    return True


n = int(input())
nums = []
while 0 < n:
    nums.append(int(input()))
    n -= 1
cnt = 0
for num in nums:
    if isPrime(num):
        cnt += 1
print(cnt)

import math


def isPrime(x):
    if 2 == x or 3 == x:
        return True
    if 0 == x & 1:
        return False
    i = 3
    limit = math.sqrt(x)
    while i <= limit:
        if 0 == x % i:
            return False
        i += 2
    return True


n = int(input())
nums = []
i = 0
while i < n:
    nums.append(int(input()))
    i += 1
cnt = i = 0
for val in nums:
    if isPrime(val):
        cnt += 1
print(cnt)

+import math + + -    while i * i <= x: +    limit = math.sqrt(x) +    while i <= limit: -        i += 1 +        i += 2 -while 0 < n: +i = 0 +while i < n: -    n -= 1 -cnt = 0 -for num in nums: -    if isPrime(num): +    i += 1 +cnt = i = 0 +for val in nums: +    if isPrime(val):