s=[2]
a=[int(i) for i in range(2,10000) if pow(2 ,int(i)-1, int(i)) ==1]

while a!=[]:
    t=a[0]
    a=[i for i in a if i % t !=0]
    s.append(t)

n=int(input())
x=0
for i  in range(n):
    y=0
    t = int(input())
    for j in s:
        if t % j ==0 and t !=j:
           break
    else:
        x+=1
print(x) s=[2] s [2] 2 int(i) for i in range(2,10000) if pow(2 ,int(i)-1, int(i)) ==1 for i in range(2,10000) if pow(2 ,int(i)-1, int(i)) ==1 i range(2,10000) range 2 10000 pow(2 ,int(i)-1, int(i)) ==1 pow(2 ,int(i)-1, int(i)) pow 2 int(i)-1 int(i) int i 1 int(i) int i 1 if pow(2 ,int(i)-1, int(i)) ==1 int(i) int i a=[int(i) for i in range(2,10000) if pow(2 ,int(i)-1, int(i)) ==1] a [int(i) for i in range(2,10000) if pow(2 ,int(i)-1, int(i)) ==1] while a!=[]:
    t=a[0]
    a=[i for i in a if i % t !=0]
    s.append(t) a!=[] a [] t=a[0] t a[0] a 0 i for i in a if i % t !=0 for i in a if i % t !=0 i a i % t !=0 i % t i t 0 if i % t !=0 i a=[i for i in a if i % t !=0] a [i for i in a if i % t !=0] s.append(t) s.append s append t n=int(input()) n int(input()) int input() input x=0 x 0 for i  in range(n):
    y=0
    t = int(input())
    for j in s:
        if t % j ==0 and t !=j:
           break
    else:
        x+=1 i range(n) range n y=0 y 0 t = int(input()) t int(input()) int input() input for j in s:
        if t % j ==0 and t !=j:
           break
    else:
        x+=1 j s if t % j ==0 and t !=j:
           break
     t % j ==0 and t !=j t % j ==0 t % j t j 0 t !=j t j break x+=1 x 1 print(x) print x a=[int(i) for i in range(2,10000) if pow(2 ,int(i)-1, int(i)) ==1] [int(i) for i in range(2,10000) if pow(2 ,int(i)-1, int(i)) ==1] a t = int(input()) int(input()) t s=[2] [2] s t=a[0] a[0] t n=int(input()) int(input()) n x+=1 1 x a=[i for i in a if i % t !=0] [i for i in a if i % t !=0] a y=0 0 y x=0 0 x
s=[2]
a=[int(i) for i in range(2,10000) if pow(2 ,int(i)-1, int(i)) ==1]

while a!=[]:
    t=a[0]
    a=[i for i in a if i % t !=0]
    s.append(t)

n=int(input())
x=0
for i  in range(n):
    y=0
    t = int(input())
    for j in s:
        if t % j ==0 and t !=j:
           break
    else:
        x+=1
print(x)