def isPrime(n):
    for i in range(2, n):
        if i * i > n:
            return 1
        if n % i == 0:
            return 0
    return 1
 
ans = 0
n = int(input())
for i in range(n):
    x = int(input())
    ans = ans + isPrime(x)
 
print(ans) def isPrime(n):
    for i in range(2, n):
        if i * i > n:
            return 1
        if n % i == 0:
            return 0
    return 1
  isPrime for i in range(2, n):
        if i * i > n:
            return 1
        if n % i == 0:
            return 0
     i range(2, n) range 2 n if i * i > n:
            return 1
         i * i > n i * i i i n return 1 1 if n % i == 0:
            return 0
     n % i == 0 n % i n i 0 return 0 0 return 1 1 n n ans = 0 ans 0 n = int(input()) n int(input()) int input() input for i in range(n):
    x = int(input())
    ans = ans + isPrime(x)
  i range(n) range n x = int(input()) x int(input()) int input() input ans = ans + isPrime(x) ans ans + isPrime(x) ans isPrime(x) isPrime x print(ans) print ans x = int(input()) int(input()) x ans = ans + isPrime(x) ans + isPrime(x) ans n = int(input()) int(input()) n def isPrime(n):
    for i in range(2, n):
        if i * i > n:
            return 1
        if n % i == 0:
            return 0
    return 1
  def isPrime(n):
    for i in range(2, n):
        if i * i > n:
            return 1
        if n % i == 0:
            return 0
    return 1
  isPrime ans = 0 0 ans
def isPrime(n):
    for i in range(2, n):
        if i * i > n:
            return 1
        if n % i == 0:
            return 0
    return 1
 
ans = 0
n = int(input())
for i in range(n):
    x = int(input())
    ans = ans + isPrime(x)
 
print(ans)
