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

let sortedA = A.enumerated().sorted(by: {$0.element < $1.element })

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

print(count)
