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

/*昇順ソート*/
int compare_int(const void *a, const void *b)
{
    return *(int *)a - *(int *)b;
}

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

    long a[n];
    long i,j;
    for(i=0;i<n;i++){
        scanf("%ld",&a[i]);
    }

    int judge[200000];
    
    for(i=0;i<n;i++){
        judge[i]=0;
    }

    qsort(a, n, sizeof(long), compare_int);
    /*クイックソート*/

    for(i=0;i<n-1;i++){
        for(j=i+1;j<n;j++){
            if(a[j]%a[i]==0){
                judge[j]=1;
            }
            if(a[i]==a[j]){
                judge[i]=1;
                judge[j]=1;
            }
        }
    }

    long ans=0;
    for(i=0;i<n;i++){
        if(judge[i]==0){
            ans++;
        }
    }
    printf("%ld\n",ans);
    

    return 0;
}
