
// A[i]は自分以外すべての要素に対して互いに素である？

function main(input) {
    let [N, ...As] = input.trim().split(/[\s\n]/).map(Number)
    
    As.sort((a,b) => a-b)

    let counter = 0
    for(let i = 0; i < N; i++) {
        let matched = true

        const Ai = As[i]
        const a_s = Math.sqrt(Ai)

        if(As.filter(a => a === Ai).length > 1) {
            continue
        }
        
        for(let j = 0; j < N; j++) {
            if(i === j) continue
            const Aj = As[j]
            if(Aj > a_s) break

            if(Ai % Aj === 0) {
                matched = false
                break
            }
        }
        
        if(matched) counter++
    }

    console.log(counter)
}

main(require("fs").readFileSync("/dev/stdin", "utf8"))
