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 })

let countedA = A.map { (value: $0, count: NSCountedSet(array: A).count(for: $0)) }
var ng = Set<Int>.init()
var count = 0
for i in 0..<N {
    if 1 < countedA[i].count { continue }
    if !ng.contains(countedA[i].value) {
        for j in 0..<i {
            if countedA[i].value % countedA[j].value == 0 {
                ng.insert(countedA[i].value)
                break
            }
        }
        if !ng.contains(countedA[i].value) {
            count += 1
        }
    }
}

print(count)
