let N = Int(readLine()!)!
let A: [Int] = readLine()!.split(separator: " ").map { Int($0)! }.sorted()

var dp: [Bool] = Array(repeating: true, count: 3*Int(1e6))
var x: Int = -1
for a in A {
    if x == a { continue }
    x = a
    while x <= A[N-1] {
        x += a
        dp[x] = false
    }
    x = a
}

var res: Int = 0
for (i, a) in A.enumerated() {
    if i > 0 && a == A[i-1] { continue }
    if i < N-1 && a == A[i+1] { continue }
    if dp[a] { res += 1 }
}
print(res)  // (๑•ૅㅁ•๑)