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

var ng = Set<Int>.init()

var count = 0
for i in 0..<N {
    if !ng.contains(A[i]) {
        for j in 0..<i {
            if A[i] % A[j] == 0 {
                ng.insert(A[i])
                break
            }
        }
        if !ng.contains(A[i]) {
            if i != N - 1 && A[i] == A[i + 1] {
                ng.insert(A[i])
            } else {
                count += 1
            }
        }
    }
}

print(count)