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

void merge_sort (int array[], int left, int right) {
  int i, j, k, mid;
  int work[100000];  // 作業用配列
  if (left < right) {
    mid = (left + right)/2; // 真ん中
    merge_sort(array, left, mid);  // 左を整列
    merge_sort(array, mid+1, right);  // 右を整列
    for (i = mid; i >= left; i--) { work[i] = array[i]; } // 左半分
    for (j = mid+1; j <= right; j++) {
      work[right-(j-(mid+1))] = array[j]; // 右半分を逆順
    }
    i = left; j = right;
    for (k = left; k <= right; k++) {
      if (work[i] < work[j]) { array[k] = work[i++]; }
      else                   { array[k] = work[j--]; }
    }
  }
}



int main(void){
    
    int n;
    scanf("%d",&n);
    
    int a[200001]={0};
    int num[200001]={0};
    
    for(int i=1;i<=n;i++){
    scanf("%d",&a[i]);
    }
    
    merge_sort(a, 1, n);
    
    for (int i=1; i<=n; ++i) {
            if (a[i]==a[i+1]) {
               num[i]=1;
            }
            
            if(num[i]==0){
                for (int j=i+1; j<=n; ++j) {
                    if (a[j]%a[i]==0) {
                        num[j]=1;
                    }
                }
            }
    }
    
    int ans = n;
    for (int i=1; i<=n; i++) {
        ans-=num[i];
    }
    
    printf("%d",ans);
    return 0;
}