import math


def is_prime(n):
  if n in [2, 3, 5, 7]:
    return True
  elif 0 in [n%2, n%3, n%5, n%7]:
    return False
  else:
    check_max = math.ceil(math.sqrt(n))
    for i in range(2, check_max + 1):
      if n % i == 0:
        return False
    else:
      return True

def main():
  primes = set([])
  length = int(input())
  for _ in range(0, length):
    n = int(input())
    if is_prime(n):
      primes.add(n)

  print(len(primes))
  return 0


if __name__ == '__main__':
  main() import math math def is_prime(n):
  if n in [2, 3, 5, 7]:
    return True
  elif 0 in [n%2, n%3, n%5, n%7]:
    return False
  else:
    check_max = math.ceil(math.sqrt(n))
    for i in range(2, check_max + 1):
      if n % i == 0:
        return False
    else:
      return True is_prime if n in [2, 3, 5, 7]:
    return True
  elif 0 in [n%2, n%3, n%5, n%7]:
    return False
  else:
    check_max = math.ceil(math.sqrt(n))
    for i in range(2, check_max + 1):
      if n % i == 0:
        return False
    else:
      return True n in [2, 3, 5, 7] n [2, 3, 5, 7] 2 3 5 7 return True True elif 0 in [n%2, n%3, n%5, n%7]:
    return False
   0 in [n%2, n%3, n%5, n%7] 0 [n%2, n%3, n%5, n%7] n%2 n 2 n%3 n 3 n%5 n 5 n%7 n 7 return False False check_max = math.ceil(math.sqrt(n)) check_max math.ceil(math.sqrt(n)) math.ceil math ceil math.sqrt(n) math.sqrt math sqrt n for i in range(2, check_max + 1):
      if n % i == 0:
        return False
    else:
      return True i range(2, check_max + 1) range 2 check_max + 1 check_max 1 if n % i == 0:
        return False
     n % i == 0 n % i n i 0 return False False return True True n n def main():
  primes = set([])
  length = int(input())
  for _ in range(0, length):
    n = int(input())
    if is_prime(n):
      primes.add(n)

  print(len(primes))
  return 0 main primes = set([]) primes set([]) set [] length = int(input()) length int(input()) int input() input for _ in range(0, length):
    n = int(input())
    if is_prime(n):
      primes.add(n)

   _ range(0, length) range 0 length n = int(input()) n int(input()) int input() input if is_prime(n):
      primes.add(n)

   is_prime(n) is_prime n primes.add(n) primes.add primes add n print(len(primes)) print len(primes) len primes return 0 0 if __name__ == '__main__':
  main() __name__ == '__main__' __name__ '__main__' main() main def is_prime(n):
  if n in [2, 3, 5, 7]:
    return True
  elif 0 in [n%2, n%3, n%5, n%7]:
    return False
  else:
    check_max = math.ceil(math.sqrt(n))
    for i in range(2, check_max + 1):
      if n % i == 0:
        return False
    else:
      return True def is_prime(n):
  if n in [2, 3, 5, 7]:
    return True
  elif 0 in [n%2, n%3, n%5, n%7]:
    return False
  else:
    check_max = math.ceil(math.sqrt(n))
    for i in range(2, check_max + 1):
      if n % i == 0:
        return False
    else:
      return True is_prime def main():
  primes = set([])
  length = int(input())
  for _ in range(0, length):
    n = int(input())
    if is_prime(n):
      primes.add(n)

  print(len(primes))
  return 0 def main():
  primes = set([])
  length = int(input())
  for _ in range(0, length):
    n = int(input())
    if is_prime(n):
      primes.add(n)

  print(len(primes))
  return 0 main
import math


def is_prime(n):
  if n in [2, 3, 5, 7]:
    return True
  elif 0 in [n%2, n%3, n%5, n%7]:
    return False
  else:
    check_max = math.ceil(math.sqrt(n))
    for i in range(2, check_max + 1):
      if n % i == 0:
        return False
    else:
      return True

def main():
  primes = set([])
  length = int(input())
  for _ in range(0, length):
    n = int(input())
    if is_prime(n):
      primes.add(n)

  print(len(primes))
  return 0


if __name__ == '__main__':
  main()