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

import sys
import os
import math


N = int(input())


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

cnt = 0
for i in range(N):
    v = int(input())
    if is_prime(v):
        cnt += 1

print(cnt) import sys sys import os os import math math N = int(input()) N int(input()) int input() input def is_prime(n):
    for i in range(2, int(math.sqrt(n)) + 1):
        if n % i == 0:
            return False
    return True is_prime 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 cnt = 0 cnt 0 for i in range(N):
    v = int(input())
    if is_prime(v):
        cnt += 1 i range(N) range N v = int(input()) v int(input()) int input() input if is_prime(v):
        cnt += 1 is_prime(v) is_prime v cnt += 1 cnt 1 print(cnt) print cnt N = int(input()) int(input()) N cnt = 0 0 cnt def is_prime(n):
    for i in range(2, int(math.sqrt(n)) + 1):
        if n % i == 0:
            return False
    return True def is_prime(n):
    for i in range(2, int(math.sqrt(n)) + 1):
        if n % i == 0:
            return False
    return True is_prime v = int(input()) int(input()) v cnt += 1 1 cnt
# -*- coding: utf-8 -*-

import sys
import os
import math


N = int(input())


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

cnt = 0
for i in range(N):
    v = int(input())
    if is_prime(v):
        cnt += 1

print(cnt)