func readIntArray() -> [Int] {
    readLine()!.split(separator: " ").map({Int($0)!})
}

let N = Int(readLine()!)!
var A = readIntArray()
A.sort()

var multiple = Array.init(repeating: false, count: N)

for i in 0..<N {
    if multiple[i] {
        continue
    }
    for j in (i + 1)..<N {
        if (multiple[j]) {
            continue
        }
        if (A[j] % A[i] == 0) {
            multiple[j] = true
        }
    }
}

var count = multiple[N - 1] ? 0 : 1
for i in 0..<(N - 1) {
    if !multiple[i] && A[i] != A[i + 1] {
        count += 1
    }
}

print(count)
