def check_prime(num):
    if num == 2:
        return True

    if num < 2 or num % 2 == 0:
        return False

    return pow(2,num-1,num) == 1

cnt_num = int(input())
dataset = [int(input()) for i in range(cnt_num)]

count = 0
for i in dataset:
    if check_prime(i):
        count += 1

print(count) def check_prime(num):
    if num == 2:
        return True

    if num < 2 or num % 2 == 0:
        return False

    return pow(2,num-1,num) == 1 check_prime if num == 2:
        return True

     num == 2 num 2 return True True if num < 2 or num % 2 == 0:
        return False

     num < 2 or num % 2 == 0 num < 2 num 2 num % 2 == 0 num % 2 num 2 0 return False False return pow(2,num-1,num) == 1 pow(2,num-1,num) == 1 pow(2,num-1,num) pow 2 num-1 num 1 num 1 num num cnt_num = int(input()) cnt_num int(input()) int input() input int(input()) for i in range(cnt_num) for i in range(cnt_num) i range(cnt_num) range cnt_num for i in range(cnt_num) int(input()) int input() input dataset = [int(input()) for i in range(cnt_num)] dataset [int(input()) for i in range(cnt_num)] count = 0 count 0 for i in dataset:
    if check_prime(i):
        count += 1 i dataset if check_prime(i):
        count += 1 check_prime(i) check_prime i count += 1 count 1 print(count) print count count = 0 0 count dataset = [int(input()) for i in range(cnt_num)] [int(input()) for i in range(cnt_num)] dataset cnt_num = int(input()) int(input()) cnt_num def check_prime(num):
    if num == 2:
        return True

    if num < 2 or num % 2 == 0:
        return False

    return pow(2,num-1,num) == 1 def check_prime(num):
    if num == 2:
        return True

    if num < 2 or num % 2 == 0:
        return False

    return pow(2,num-1,num) == 1 check_prime count += 1 1 count
def check_prime(num):
    if num == 2:
        return True

    if num < 2 or num % 2 == 0:
        return False

    return pow(2,num-1,num) == 1

cnt_num = int(input())
dataset = [int(input()) for i in range(cnt_num)]

count = 0
for i in dataset:
    if check_prime(i):
        count += 1

print(count)