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

var ng = Set<Int>.init(minimumCapacity: N)
var count = 0
for i in 1...N {
    var isBreak = false
    if !ng.contains(A[i - 1]) {
        for j in 1...N {
            if i != j && A[i - 1] % A[j - 1] == 0 {
                ng.insert(A[i - 1])
                isBreak = true
                break
            }
        }
    }
    count += isBreak ? 0 : 1
}

print(count)
