#include <stdio.h>
#include <stdlib.h>

int compareInt(const void *a, const void *b)
{
    return *(int*)a - *(int*)b;
}

int main(void){
    unsigned long int n;
    scanf("%ld",&n);

    unsigned long int a[n];
    int ans=0;
    int flag = 1;
    unsigned long int min=10000000;

    for(int i=0;i<n;i++)  {
        scanf("%ld",&a[i]);
        if(a[i]<min) min = a[i];
    } 
    qsort(a,n,sizeof(unsigned long int),compareInt);

    for(int i=0;i<n;i++){
        flag = 1;
        if(a[i] == a[i-1] || a[i] == a[i+1]) flag=0;
        else
        for(int j=0;j<i;j++){
            if(a[i]%a[j] == 0){
                flag = 0;
                break;
            }
        }
        if(flag == 1) ans ++;
    }


    printf("%d",ans);

    return 0;
}