#!/usr/bin/env python
# -*- coding: utf-8 -*-


"""
input:
11
7
8
9
10
11
12
13
14
15
16
17

output:
4
"""

import sys
import math


def is_prime(x):
    if x == 2:
        return True
    elif x < 2 or not x % 2:
        return False

    i = 3
    x_sqrt = math.sqrt(x)
    while i <= x_sqrt:
        if not x % i:
            return False
        i += 2

    return True


def solve(_c_list):
    cnt = 0
    for ele in _c_list:
        if is_prime(ele):
            cnt += 1
    return cnt


if __name__ == '__main__':
    _input = sys.stdin.readlines()
    c_num = int(_input[0])
    c_list = list(map(int, _input[1:]))
    ans = solve(c_list)
    print(ans) """
input:
11
7
8
9
10
11
12
13
14
15
16
17

output:
4
""" import sys sys import math math def is_prime(x):
    if x == 2:
        return True
    elif x < 2 or not x % 2:
        return False

    i = 3
    x_sqrt = math.sqrt(x)
    while i <= x_sqrt:
        if not x % i:
            return False
        i += 2

    return True is_prime if x == 2:
        return True
    elif x < 2 or not x % 2:
        return False

     x == 2 x 2 return True True elif x < 2 or not x % 2:
        return False

     x < 2 or not x % 2 x < 2 x 2 not x % 2 x % 2 x 2 return False False i = 3 i 3 x_sqrt = math.sqrt(x) x_sqrt math.sqrt(x) math.sqrt math sqrt x while i <= x_sqrt:
        if not x % i:
            return False
        i += 2

     i <= x_sqrt i x_sqrt if not x % i:
            return False
         not x % i x % i x i return False False i += 2 i 2 return True True x x def solve(_c_list):
    cnt = 0
    for ele in _c_list:
        if is_prime(ele):
            cnt += 1
    return cnt solve cnt = 0 cnt 0 for ele in _c_list:
        if is_prime(ele):
            cnt += 1
     ele _c_list if is_prime(ele):
            cnt += 1
     is_prime(ele) is_prime ele cnt += 1 cnt 1 return cnt cnt _c_list _c_list if __name__ == '__main__':
    _input = sys.stdin.readlines()
    c_num = int(_input[0])
    c_list = list(map(int, _input[1:]))
    ans = solve(c_list)
    print(ans) __name__ == '__main__' __name__ '__main__' _input = sys.stdin.readlines() _input sys.stdin.readlines() sys.stdin.readlines sys.stdin sys stdin readlines c_num = int(_input[0]) c_num int(_input[0]) int _input[0] _input 0 c_list = list(map(int, _input[1:])) c_list list(map(int, _input[1:])) list map(int, _input[1:]) map int _input[1:] _input 1: 1 ans = solve(c_list) ans solve(c_list) solve c_list print(ans) print ans ans = solve(c_list) solve(c_list) ans def is_prime(x):
    if x == 2:
        return True
    elif x < 2 or not x % 2:
        return False

    i = 3
    x_sqrt = math.sqrt(x)
    while i <= x_sqrt:
        if not x % i:
            return False
        i += 2

    return True def is_prime(x):
    if x == 2:
        return True
    elif x < 2 or not x % 2:
        return False

    i = 3
    x_sqrt = math.sqrt(x)
    while i <= x_sqrt:
        if not x % i:
            return False
        i += 2

    return True is_prime _input = sys.stdin.readlines() sys.stdin.readlines() _input def solve(_c_list):
    cnt = 0
    for ele in _c_list:
        if is_prime(ele):
            cnt += 1
    return cnt def solve(_c_list):
    cnt = 0
    for ele in _c_list:
        if is_prime(ele):
            cnt += 1
    return cnt solve c_num = int(_input[0]) int(_input[0]) c_num c_list = list(map(int, _input[1:])) list(map(int, _input[1:])) c_list
#!/usr/bin/env python
# -*- coding: utf-8 -*-


"""
input:
11
7
8
9
10
11
12
13
14
15
16
17

output:
4
"""

import sys
import math


def is_prime(x):
    if x == 2:
        return True
    elif x < 2 or not x % 2:
        return False

    i = 3
    x_sqrt = math.sqrt(x)
    while i <= x_sqrt:
        if not x % i:
            return False
        i += 2

    return True


def solve(_c_list):
    cnt = 0
    for ele in _c_list:
        if is_prime(ele):
            cnt += 1
    return cnt


if __name__ == '__main__':
    _input = sys.stdin.readlines()
    c_num = int(_input[0])
    c_list = list(map(int, _input[1:]))
    ans = solve(c_list)
    print(ans)