# -*- coding: utf-8 -*-


def is_prime(number):
    if number == 2:
        return True
    elif number < 2 or number % 2 == 0:
        return False
    else:
        i = 3
        while i <= pow(number, 0.5):
            if number % i == 0:
                return False
            i += 2
        return True


if __name__ == '__main__':
    N = input()
    numbers = [input() for i in xrange(N)]
    count = 0
    for i in xrange(len(numbers)):
        if is_prime(numbers[i]):
            count += 1
    print count def is_prime(number):
    if number == 2:
        return True
    elif number < 2 or number % 2 == 0:
        return False
    else:
        i = 3
        while i <= pow(number, 0.5):
            if number % i == 0:
                return False
            i += 2
        return True is_prime if number == 2:
        return True
    elif number < 2 or number % 2 == 0:
        return False
    else:
        i = 3
        while i <= pow(number, 0.5):
            if number % i == 0:
                return False
            i += 2
        return True number == 2 number 2 return True True elif number < 2 or number % 2 == 0:
        return False
     number < 2 or number % 2 == 0 number < 2 number 2 number % 2 == 0 number % 2 number 2 0 return False False i = 3 i 3 while i <= pow(number, 0.5):
            if number % i == 0:
                return False
            i += 2
         i <= pow(number, 0.5) i pow(number, 0.5) pow number 0.5 if number % i == 0:
                return False
             number % i == 0 number % i number i 0 return False False i += 2 i 2 return True True number number if __name__ == '__main__':
    N = input()
    numbers = [input() for i in xrange(N)]
    count = 0
    for i in xrange(len(numbers)):
        if is_prime(numbers[i]):
            count += 1
    print count __name__ == '__main__' __name__ '__main__' N = input() N input() input input() for i in xrange(N) for i in xrange(N) i xrange(N) xrange N for i in xrange(N) input() input numbers = [input() for i in xrange(N)] numbers [input() for i in xrange(N)] count = 0 count 0 for i in xrange(len(numbers)):
        if is_prime(numbers[i]):
            count += 1
     i xrange(len(numbers)) xrange len(numbers) len numbers if is_prime(numbers[i]):
            count += 1
     is_prime(numbers[i]) is_prime numbers[i] numbers i count += 1 count 1 print count += 1 1 count numbers = [input() for i in xrange(N)] [input() for i in xrange(N)] numbers def is_prime(number):
    if number == 2:
        return True
    elif number < 2 or number % 2 == 0:
        return False
    else:
        i = 3
        while i <= pow(number, 0.5):
            if number % i == 0:
                return False
            i += 2
        return True def is_prime(number):
    if number == 2:
        return True
    elif number < 2 or number % 2 == 0:
        return False
    else:
        i = 3
        while i <= pow(number, 0.5):
            if number % i == 0:
                return False
            i += 2
        return True is_prime count = 0 0 count N = input() input() N
# -*- coding: utf-8 -*-


def is_prime(number):
    if number == 2:
        return True
    elif number < 2 or number % 2 == 0:
        return False
    else:
        i = 3
        while i <= pow(number, 0.5):
            if number % i == 0:
                return False
            i += 2
        return True


if __name__ == '__main__':
    N = input()
    numbers = [input() for i in xrange(N)]
    count = 0
    for i in xrange(len(numbers)):
        if is_prime(numbers[i]):
            count += 1
    print count