import math

def prime_detector(num):
    sqrt = int(math.sqrt(num))
    if any(num % i == 0 for i in range(2,sqrt+1)): return False
    else: return True
    
def main():

    number = int(input())
    
    numbers_tuple = tuple(int(input()) for i in range(number))
    
    print(sum(prime_detector(n) for n in numbers_tuple))

main() import math math def prime_detector(num):
    sqrt = int(math.sqrt(num))
    if any(num % i == 0 for i in range(2,sqrt+1)): return False
    else: return True
     prime_detector sqrt = int(math.sqrt(num)) sqrt int(math.sqrt(num)) int math.sqrt(num) math.sqrt math sqrt num if any(num % i == 0 for i in range(2,sqrt+1)): return False
    else: return True
     any(num % i == 0 for i in range(2,sqrt+1)) any num % i == 0 num % i num i 0 num num def main():

    number = int(input())
    
    numbers_tuple = tuple(int(input()) for i in range(number))
    
    print(sum(prime_detector(n) for n in numbers_tuple)) main number = int(input()) number int(input()) int input() input numbers_tuple = tuple(int(input()) for i in range(number)) numbers_tuple tuple(int(input()) for i in range(number)) tuple int(input()) int input() input print(sum(prime_detector(n) for n in numbers_tuple)) print sum(prime_detector(n) for n in numbers_tuple) sum prime_detector(n) prime_detector n main() main def main():

    number = int(input())
    
    numbers_tuple = tuple(int(input()) for i in range(number))
    
    print(sum(prime_detector(n) for n in numbers_tuple)) def main():

    number = int(input())
    
    numbers_tuple = tuple(int(input()) for i in range(number))
    
    print(sum(prime_detector(n) for n in numbers_tuple)) main def prime_detector(num):
    sqrt = int(math.sqrt(num))
    if any(num % i == 0 for i in range(2,sqrt+1)): return False
    else: return True
     def prime_detector(num):
    sqrt = int(math.sqrt(num))
    if any(num % i == 0 for i in range(2,sqrt+1)): return False
    else: return True
     prime_detector
import math

def prime_detector(num):
    sqrt = int(math.sqrt(num))
    if any(num % i == 0 for i in range(2,sqrt+1)): return False
    else: return True
    
def main():

    number = int(input())
    
    numbers_tuple = tuple(int(input()) for i in range(number))
    
    print(sum(prime_detector(n) for n in numbers_tuple))

main()