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
for i in 0..<N {
    if !ng.contains(sortedA[i].element) {
        if i + 1 != N && sortedA[i].element == sortedA[i + 1].element {
            ng.insert(sortedA[i].element)
        } else {
            var isBreak = false
            for j in 0..<i {
                if sortedA[i].element % sortedA[j].element == 0 {
                    ng.insert(sortedA[i].element)
                    isBreak = true
                    break
                }
            }
            count += isBreak ? 0 : 1
        }
    }
}

print(count)
