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

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

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



print(p)
