from math import sqrt
n = int(input())
p = 0

for i in range(n):
    x = int(input())
    if x == 2:
        p += 1
    elif x%2 == 1:
        j=3
        f = 0
        while j < (int(sqrt(x))+1):
            if x%j == 0:
                f = 1
                break
            else:
                j += 2
        if f == 0:
            p += 1



print(p) from math import sqrt n = int(input()) n int(input()) int input() input p = 0 p 0 for i in range(n):
    x = int(input())
    if x == 2:
        p += 1
    elif x%2 == 1:
        j=3
        f = 0
        while j < (int(sqrt(x))+1):
            if x%j == 0:
                f = 1
                break
            else:
                j += 2
        if f == 0:
            p += 1 i range(n) range n x = int(input()) x int(input()) int input() input if x == 2:
        p += 1
    elif x%2 == 1:
        j=3
        f = 0
        while j < (int(sqrt(x))+1):
            if x%j == 0:
                f = 1
                break
            else:
                j += 2
        if f == 0:
            p += 1 x == 2 x 2 p += 1 p 1 elif x%2 == 1:
        j=3
        f = 0
        while j < (int(sqrt(x))+1):
            if x%j == 0:
                f = 1
                break
            else:
                j += 2
        if f == 0:
            p += 1 x%2 == 1 x%2 x 2 1 j=3 j 3 f = 0 f 0 while j < (int(sqrt(x))+1):
            if x%j == 0:
                f = 1
                break
            else:
                j += 2
         j < (int(sqrt(x))+1) j int(sqrt(x))+1 int(sqrt(x)) int sqrt(x) sqrt x 1 if x%j == 0:
                f = 1
                break
            else:
                j += 2
         x%j == 0 x%j x j 0 f = 1 f 1 break j += 2 j 2 if f == 0:
            p += 1 f == 0 f 0 p += 1 p 1 print(p) print p p = 0 0 p p += 1 1 p n = int(input()) int(input()) n j=3 3 j j += 2 2 j x = int(input()) int(input()) x f = 0 0 f p += 1 1 p f = 1 1 f
from math import sqrt
n = int(input())
p = 0

for i in range(n):
    x = int(input())
    if x == 2:
        p += 1
    elif x%2 == 1:
        j=3
        f = 0
        while j < (int(sqrt(x))+1):
            if x%j == 0:
                f = 1
                break
            else:
                j += 2
        if f == 0:
            p += 1



print(p)
