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 ok = Set<Int>.init(minimumCapacity: N)
var ng = Set<Int>.init(minimumCapacity: N)

var count = 0
for i in 0..<N {
    if !ng.contains(sortedA[i].element) {
        ok.removeAll(keepingCapacity: true)
        for j in 0..<i {
            if !ok.contains(sortedA[j].element) {
                if sortedA[i].element % sortedA[j].element == 0 {
                    ng.insert(sortedA[i].element)
                    break
                }
                ok.insert(sortedA[j].element)
            }
        }
        if !ng.contains(sortedA[i].element) {
            if i + 1 != N && sortedA[i].element == sortedA[i + 1].element {
                ng.insert(sortedA[i].element)
            } else {
                count += 1
            }
        }
    }
}

print(count)