n = int(input())
c = 0

def devisor(n):
    if n == 2:
        return 1
    else:
        if n < 2 or n % 2 == 0:
            return 0
        elif pow(2,n-1,n) == 1:
            return 1
        else: return 0

for i in range(n):
    x = int(input())
    c += devisor(x)

print(c) n = int(input()) n int(input()) int input() input c = 0 c 0 def devisor(n):
    if n == 2:
        return 1
    else:
        if n < 2 or n % 2 == 0:
            return 0
        elif pow(2,n-1,n) == 1:
            return 1
        else: return 0 devisor if n == 2:
        return 1
    else:
        if n < 2 or n % 2 == 0:
            return 0
        elif pow(2,n-1,n) == 1:
            return 1
        else: return 0 n == 2 n 2 return 1 1 if n < 2 or n % 2 == 0:
            return 0
        elif pow(2,n-1,n) == 1:
            return 1
        else: return 0 n < 2 or n % 2 == 0 n < 2 n 2 n % 2 == 0 n % 2 n 2 0 return 0 0 elif pow(2,n-1,n) == 1:
            return 1
         pow(2,n-1,n) == 1 pow(2,n-1,n) pow 2 n-1 n 1 n 1 return 1 1 n n for i in range(n):
    x = int(input())
    c += devisor(x) i range(n) range n x = int(input()) x int(input()) int input() input c += devisor(x) c devisor(x) devisor x print(c) print c c = 0 0 c x = int(input()) int(input()) x c += devisor(x) devisor(x) c def devisor(n):
    if n == 2:
        return 1
    else:
        if n < 2 or n % 2 == 0:
            return 0
        elif pow(2,n-1,n) == 1:
            return 1
        else: return 0 def devisor(n):
    if n == 2:
        return 1
    else:
        if n < 2 or n % 2 == 0:
            return 0
        elif pow(2,n-1,n) == 1:
            return 1
        else: return 0 devisor n = int(input()) int(input()) n
n = int(input())
c = 0

def devisor(n):
    if n == 2:
        return 1
    else:
        if n < 2 or n % 2 == 0:
            return 0
        elif pow(2,n-1,n) == 1:
            return 1
        else: return 0

for i in range(n):
    x = int(input())
    c += devisor(x)

print(c)