import math

def isprime(n):

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

    return True


if __name__ == '__main__':

    n = int(input())
    nums = []
    for _ in range(n):
        nums.append(int(input()))

    count = 0
    for n in nums:
        if isprime(n):
            count += 1

    print(count) import math math def isprime(n):

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

    return True isprime for i in range(2, int(math.sqrt(n))+1):
        if n % i == 0:
            return False

     i range(2, int(math.sqrt(n))+1) range 2 int(math.sqrt(n))+1 int(math.sqrt(n)) int math.sqrt(n) math.sqrt math sqrt n 1 if n % i == 0:
            return False

     n % i == 0 n % i n i 0 return False False return True True n n if __name__ == '__main__':

    n = int(input())
    nums = []
    for _ in range(n):
        nums.append(int(input()))

    count = 0
    for n in nums:
        if isprime(n):
            count += 1

    print(count) __name__ == '__main__' __name__ '__main__' n = int(input()) n int(input()) int input() input nums = [] nums [] for _ in range(n):
        nums.append(int(input()))

     _ range(n) range n nums.append(int(input())) nums.append nums append int(input()) int input() input count = 0 count 0 for n in nums:
        if isprime(n):
            count += 1

     n nums if isprime(n):
            count += 1

     isprime(n) isprime n count += 1 count 1 print(count) print count count = 0 0 count count += 1 1 count n = int(input()) int(input()) n def isprime(n):

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

    return True def isprime(n):

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

    return True isprime nums = [] [] nums
import math

def isprime(n):

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

    return True


if __name__ == '__main__':

    n = int(input())
    nums = []
    for _ in range(n):
        nums.append(int(input()))

    count = 0
    for n in nums:
        if isprime(n):
            count += 1

    print(count)
