import sys
import math

def isprime(n):
    if n == 2:
        return 1
    if n < 2 or n % 2 == 0:
        return 0

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

n = int(input())
p = 0
for i in map(int, sys.stdin.readlines()):
    p += isprime(i)

print(p) import sys sys import math math def isprime(n):
    if n == 2:
        return 1
    if n < 2 or n % 2 == 0:
        return 0

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

     n < 2 or n % 2 == 0 n < 2 n 2 n % 2 == 0 n % 2 n 2 0 return 0 0 i = 3 i 3 while i <= math.sqrt(n):
        if n % i == 0:
            return 0
        i += 2
     i <= math.sqrt(n) i math.sqrt(n) math.sqrt math sqrt n if n % i == 0:
            return 0
         n % i == 0 n % i n i 0 return 0 0 i += 2 i 2 return 1 1 n n n = int(input()) n int(input()) int input() input p = 0 p 0 for i in map(int, sys.stdin.readlines()):
    p += isprime(i) i map(int, sys.stdin.readlines()) map int sys.stdin.readlines() sys.stdin.readlines sys.stdin sys stdin readlines p += isprime(i) p isprime(i) isprime i print(p) print p n = int(input()) int(input()) n def isprime(n):
    if n == 2:
        return 1
    if n < 2 or n % 2 == 0:
        return 0

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

    i = 3
    while i <= math.sqrt(n):
        if n % i == 0:
            return 0
        i += 2
    return 1 isprime p = 0 0 p p += isprime(i) isprime(i) p
import sys
import math

def isprime(n):
    if n == 2:
        return 1
    if n < 2 or n % 2 == 0:
        return 0

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

n = int(input())
p = 0
for i in map(int, sys.stdin.readlines()):
    p += isprime(i)

print(p)