def main():
    n = int(input())
    A = []
    for _ in range(n):
        A.append(int(input()))

    A.sort(reverse = True)
    Pn = []   #Prime numbers
    for x in range(1, A[0] + 1):
        c1 = 0
        for y in range(1, x):
            if x % y == 0:
                c1 += 1
                if c1 > 1:
                    break
        if c1 == 1:
            Pn.append(x)

    c2 = 0
    for x in range(n):
        if A[x] in Pn:
            c2 += 1
    print(c2)


if __name__ == "__main__":
    main()