let n = Int(readLine()!)!
let aArray = readLine()!.split(separator: " ").map{Int($0)!}.sorted()
var count = 0
outer: for i in 0..<n {
    for j in 0..<n {
        if i == j {
            continue
        } else if aArray[j] > aArray[i] {
            break
        } else if aArray[i] % aArray[j] == 0 {
            continue outer
        }
    }
    count += 1
}
print(count)

