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);
        }
    );

    const result = [];

    for(var i = 0 ; i < N ; i++){
        var divNum = i;
        for(var j = i+1 ; j < N ; j++){
            if(As[i] == As[j]){
                const buf = As[i];
                while(i++ < N && buf == As[i]);

                break;
            }

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

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