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

var dp = Array(repeating: true, count: A.max()! + 1)
let sortedA = A.sorted()
var count = 0

for i in 0..<N {
    guard dp[sortedA[i]] else { continue }
    if 0 < i, sortedA[i] == sortedA[i - 1] {
        dp[sortedA[i]] = false
    }
    
    var multiple = 2
    while true {
        let a = sortedA[i] * multiple
        if a <= A.max()! {
            dp[a] = false
            multiple += 1
            continue
        }
        break
    }
}

for i in 0..<N {
    if dp[A[i]] {
        count += 1
    }
}

print(count)
