import math

def is_prime(x):
    if x == 2:
        return True

    if (x == 1) or (x % 2 == 0):
        return False

    for i in range(3, math.ceil(math.sqrt(x))+1, 2):
        if x % i == 0:
            return False

    return True
    
if __name__ == '__main__':
    element_number = int(input())
    input_array = [int(input()) for i in range(element_number)]

    output = 0
    for x in input_array:
        if(is_prime(x)):
            output += 1

    print(output) import math math def is_prime(x):
    if x == 2:
        return True

    if (x == 1) or (x % 2 == 0):
        return False

    for i in range(3, math.ceil(math.sqrt(x))+1, 2):
        if x % i == 0:
            return False

    return True
     is_prime if x == 2:
        return True

     x == 2 x 2 return True True if (x == 1) or (x % 2 == 0):
        return False

     (x == 1) or (x % 2 == 0) x == 1 x 1 x % 2 == 0 x % 2 x 2 0 return False False for i in range(3, math.ceil(math.sqrt(x))+1, 2):
        if x % i == 0:
            return False

     i range(3, math.ceil(math.sqrt(x))+1, 2) range 3 math.ceil(math.sqrt(x))+1 math.ceil(math.sqrt(x)) math.ceil math ceil math.sqrt(x) math.sqrt math sqrt x 1 2 if x % i == 0:
            return False

     x % i == 0 x % i x i 0 return False False return True True x x if __name__ == '__main__':
    element_number = int(input())
    input_array = [int(input()) for i in range(element_number)]

    output = 0
    for x in input_array:
        if(is_prime(x)):
            output += 1

    print(output) __name__ == '__main__' __name__ '__main__' element_number = int(input()) element_number int(input()) int input() input int(input()) for i in range(element_number) for i in range(element_number) i range(element_number) range element_number for i in range(element_number) int(input()) int input() input input_array = [int(input()) for i in range(element_number)] input_array [int(input()) for i in range(element_number)] output = 0 output 0 for x in input_array:
        if(is_prime(x)):
            output += 1

     x input_array if(is_prime(x)):
            output += 1

     is_prime(x) is_prime x output += 1 output 1 print(output) print output def is_prime(x):
    if x == 2:
        return True

    if (x == 1) or (x % 2 == 0):
        return False

    for i in range(3, math.ceil(math.sqrt(x))+1, 2):
        if x % i == 0:
            return False

    return True
     def is_prime(x):
    if x == 2:
        return True

    if (x == 1) or (x % 2 == 0):
        return False

    for i in range(3, math.ceil(math.sqrt(x))+1, 2):
        if x % i == 0:
            return False

    return True
     is_prime element_number = int(input()) int(input()) element_number output += 1 1 output output = 0 0 output input_array = [int(input()) for i in range(element_number)] [int(input()) for i in range(element_number)] input_array
import math

def is_prime(x):
    if x == 2:
        return True

    if (x == 1) or (x % 2 == 0):
        return False

    for i in range(3, math.ceil(math.sqrt(x))+1, 2):
        if x % i == 0:
            return False

    return True
    
if __name__ == '__main__':
    element_number = int(input())
    input_array = [int(input()) for i in range(element_number)]

    output = 0
    for x in input_array:
        if(is_prime(x)):
            output += 1

    print(output)