def is_prime(x):
    if x == 2:
        return True
    elif x < 2 or x % 2 == 0:
        return False
    else:
        i = 3
        while i <= x ** 0.5:
            if x % i == 0:
                return False
            i += 2
    return True
 

n = int(input())
ret = 0
while n:
    x = int(input())
    if is_prime(x): ret += 1
    n -= 1

print(ret) def is_prime(x):
    if x == 2:
        return True
    elif x < 2 or x % 2 == 0:
        return False
    else:
        i = 3
        while i <= x ** 0.5:
            if x % i == 0:
                return False
            i += 2
    return True
  is_prime if x == 2:
        return True
    elif x < 2 or x % 2 == 0:
        return False
    else:
        i = 3
        while i <= x ** 0.5:
            if x % i == 0:
                return False
            i += 2
     x == 2 x 2 return True True elif x < 2 or x % 2 == 0:
        return False
     x < 2 or x % 2 == 0 x < 2 x 2 x % 2 == 0 x % 2 x 2 0 return False False i = 3 i 3 while i <= x ** 0.5:
            if x % i == 0:
                return False
            i += 2
     i <= x ** 0.5 i x ** 0.5 x 0.5 if x % i == 0:
                return False
             x % i == 0 x % i x i 0 return False False i += 2 i 2 return True True x x n = int(input()) n int(input()) int input() input ret = 0 ret 0 while n:
    x = int(input())
    if is_prime(x): ret += 1
    n -= 1 n x = int(input()) x int(input()) int input() input if is_prime(x): ret += 1
     is_prime(x) is_prime x n -= 1 n 1 print(ret) print ret n = int(input()) int(input()) n n -= 1 1 n def is_prime(x):
    if x == 2:
        return True
    elif x < 2 or x % 2 == 0:
        return False
    else:
        i = 3
        while i <= x ** 0.5:
            if x % i == 0:
                return False
            i += 2
    return True
  def is_prime(x):
    if x == 2:
        return True
    elif x < 2 or x % 2 == 0:
        return False
    else:
        i = 3
        while i <= x ** 0.5:
            if x % i == 0:
                return False
            i += 2
    return True
  is_prime x = int(input()) int(input()) x ret = 0 0 ret
def is_prime(x):
    if x == 2:
        return True
    elif x < 2 or x % 2 == 0:
        return False
    else:
        i = 3
        while i <= x ** 0.5:
            if x % i == 0:
                return False
            i += 2
    return True
 

n = int(input())
ret = 0
while n:
    x = int(input())
    if is_prime(x): ret += 1
    n -= 1

print(ret)