class D {
    static func solve() {
        let _ = readLine()
        let _As = readLine()!.split(separator: " ").map { Int($0)! }
        let As = Array(Set(_As)).sorted()

        if As.count <= 1 {
            print("0")
            return
        }

        var ans = 0
        for i in 0..<As.count {
            var found = false
            for j in 0..<As.count {
                if i != j && As[i] % As[j] == 0 {
                    found = true
                    break
                }
            }
            if !found {
                ans += 1
            }
        }

        print(ans)
    }
}

D.solve()
