import functools
def divise(n, divisor):
    if n % divisor == 0 and n != divisor:
        return 0
    else:
        return n

if __name__ == '__main__':
    number = int(input())
    origin = [int(input()) for _ in range(number)]

    divised = origin

    for i in range(2, max(origin)+1):
        divised = list(map(functools.partial(divise, divisor=i), divised))

    for j in range(number):
        if divised[j] == 0:
            origin.pop(j)

    print(len(origin))