import Foundation
// Decimal型の有効桁数は38桁
let N = readLine()!.components(separatedBy: " ").map { Int($0)! }.first!
let A = readLine()!.components(separatedBy: " ").map { Int($0)! }.sorted(by: { $0 < $1 })

var ng = Set<Int>.init()

var count = 0

if N == 1 {
    print(1)
    exit(EXIT_SUCCESS)
} else if N == 0 || A[0] == A[N - 1] {
    print(0)
    exit(EXIT_SUCCESS)
}

for i in 0..<N {
    if !ng.contains(A[i]) {
        if i != N - 1 && A[i] == A[i + 1] {
            ng.insert(A[i])
        } else {
            for j in 0..<i {
                if A[i] % A[j] == 0 {
                    ng.insert(A[i])
                    break
                }
            }
        }
        if !ng.contains(A[i]) {
            count += 1
        }
    }
}

print(count)
