import Foundation
func readInts() -> [Int] {
    return readLine()!.components(separatedBy: " ").map { Int($0)! }
}

code_block: do {
    let n = Int(readLine()!)!
    let a = readInts()

    var ans = 0
    var flg = true
    for i in 0 ..< n {
        for j in 0 ..< n {
            if i == j { continue }
            if a[i] % a[j] == 0 {
                flg = false
            }
        }
        ans += flg ? 1 : 0
        flg = true
    }
    print(ans)
}
