read n
a=(`tr ' ' '\n' | sort -n`)
a+=(1000000007)
k=$((n-1))
c=0
for i in `seq 0 $k`
do
    for j in `seq 0 $n`
    do
        if((i==j))
        then
            continue
        elif((a[i]%a[j]==0))
        then
            break
        elif((a[i]<a[j]))
        then
            c=$((c+1))
            break
        fi
    done
done
echo $c
