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

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



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())
    ad = 1
    if x>2 and x%2==0:
        ad = 0
    else:
        j=3
        while j < (int(sqrt(x))+1):
            if x%j == 0:
                ad = 0
                break
            else:
                j += 2
    p += ad i range(n) range n x = int(input()) x int(input()) int input() input ad = 1 ad 1 if x>2 and x%2==0:
        ad = 0
    else:
        j=3
        while j < (int(sqrt(x))+1):
            if x%j == 0:
                ad = 0
                break
            else:
                j += 2
     x>2 and x%2==0 x>2 x 2 x%2==0 x%2 x 2 0 ad = 0 ad 0 j=3 j 3 while j < (int(sqrt(x))+1):
            if x%j == 0:
                ad = 0
                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:
                ad = 0
                break
            else:
                j += 2
     x%j == 0 x%j x j 0 ad = 0 ad 0 break j += 2 j 2 p += ad p ad print(p) print p p = 0 0 p ad = 0 0 ad j=3 3 j ad = 1 1 ad x = int(input()) int(input()) x ad = 0 0 ad p += ad ad p j += 2 2 j n = int(input()) int(input()) n
from math import sqrt
n = int(input())
p = 0

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



print(p)
