var lines=[];
var reader = require('readline').createInterface({
    input: process.stdin,
    output: process.stdout
});
reader.on('line', function (line) {
  lines.push(line);
});
reader.on('close', function () {
    const N = parseInt(lines[0]);
    const As = lines[1].split(' ').map( str => parseInt(str) ).sort(
        (a,b) => {
            return (a < b ? 1 : -1);
        }
    );
    console.log(As);

    const result = [];

    for(var i = 0 ; i < N-1 ; i++){
        for(var j = i+1 ; j < N ; j++){
            if(As[i]%As[j]==0)
                break;
        } 
        if(j==N) result.push(i);
    }

    console.log(result.length + 1);
});