def isPrimeNum(in_num):
    if in_num <= 1:
        return False
    elif in_num == 2:
        return True
    elif in_num % 2 == 0:
        return False
    else:
        if pow(2, in_num-1, in_num) == 1:
            return True
        else:
            return False


num_len = int(input())
cnt = 0
for i in range(num_len):
    num = int(input())
    if isPrimeNum(num)==True:
        cnt = cnt + 1

print(str(cnt)) def isPrimeNum(in_num):
    if in_num <= 1:
        return False
    elif in_num == 2:
        return True
    elif in_num % 2 == 0:
        return False
    else:
        if pow(2, in_num-1, in_num) == 1:
            return True
        else:
            return False isPrimeNum if in_num <= 1:
        return False
    elif in_num == 2:
        return True
    elif in_num % 2 == 0:
        return False
    else:
        if pow(2, in_num-1, in_num) == 1:
            return True
        else:
            return False in_num <= 1 in_num 1 return False False elif in_num == 2:
        return True
     in_num == 2 in_num 2 return True True elif in_num % 2 == 0:
        return False
     in_num % 2 == 0 in_num % 2 in_num 2 0 return False False if pow(2, in_num-1, in_num) == 1:
            return True
        else:
            return False pow(2, in_num-1, in_num) == 1 pow(2, in_num-1, in_num) pow 2 in_num-1 in_num 1 in_num 1 return True True return False False in_num in_num num_len = int(input()) num_len int(input()) int input() input cnt = 0 cnt 0 for i in range(num_len):
    num = int(input())
    if isPrimeNum(num)==True:
        cnt = cnt + 1 i range(num_len) range num_len num = int(input()) num int(input()) int input() input if isPrimeNum(num)==True:
        cnt = cnt + 1 isPrimeNum(num)==True isPrimeNum(num) isPrimeNum num True cnt = cnt + 1 cnt cnt + 1 cnt 1 print(str(cnt)) print str(cnt) str cnt def isPrimeNum(in_num):
    if in_num <= 1:
        return False
    elif in_num == 2:
        return True
    elif in_num % 2 == 0:
        return False
    else:
        if pow(2, in_num-1, in_num) == 1:
            return True
        else:
            return False def isPrimeNum(in_num):
    if in_num <= 1:
        return False
    elif in_num == 2:
        return True
    elif in_num % 2 == 0:
        return False
    else:
        if pow(2, in_num-1, in_num) == 1:
            return True
        else:
            return False isPrimeNum cnt = cnt + 1 cnt + 1 cnt cnt = 0 0 cnt num = int(input()) int(input()) num num_len = int(input()) int(input()) num_len
def isPrimeNum(in_num):
    if in_num <= 1:
        return False
    elif in_num == 2:
        return True
    elif in_num % 2 == 0:
        return False
    else:
        if pow(2, in_num-1, in_num) == 1:
            return True
        else:
            return False


num_len = int(input())
cnt = 0
for i in range(num_len):
    num = int(input())
    if isPrimeNum(num)==True:
        cnt = cnt + 1

print(str(cnt))