#include <stdio.h>
#include <stdlib.h>
int cmp(const void * n1, const void * n2){
  if(*(int *) n1 > *(int *) n2){
    return 1;
  }else if (*(int *) n1 < *(int *) n2){
    return -1;
  }else{
    return 0; 
  }
}
int main(){
    int n, num, cannum;
    num = 0;
    cannum = 0;
    scanf("%d", &n);
    int ps[n], cands[n];
    for(int i=0;i<n;i++)scanf("%d",&ps[i]);
    for(int i=0;i<n;i++)cands[i] = -1;
    
    qsort(ps, sizeof(ps)/sizeof(ps[0]), sizeof(int), cmp);
    for(int i=0;i<n;i++){
      int divable = 0;
      
      int j = i - 1;
      if (0 <= j  && ps[i] == (ps[i]/ps[j])*ps[j]){
          divable = 1;
      }
      j = i + 1;
      if (j < n && ps[i] == (ps[i]/ps[j])*ps[j]){
          divable = 1;
      }
      
      if (divable == 1 && cands[cannum-1] != i){
         cands[cannum++] = i;
      }
      
      for(j=0;j<cannum;j++){
        if (cands[j] < n && i != cands[j] && ps[i] == (ps[i]/ps[cands[j]])*ps[cands[j]]){
          divable = 1;
          break;
        }
      }

      if (divable == 0){
        num += 1;
        cands[cannum++] = i;
      }
    }
    printf("%d", num);
    return 0;
}


