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

        if !isBreak && (i + 1 == N || sortedA[i].element != sortedA[i + 1].element) {
            count += 1
        }
    }
}

print(count)
