#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 = 0;
    scanf("%d", &n);
    int ps[n];
    for(int i=0;i<n;i++)scanf("%d",&ps[i]);
  
    qsort(ps, sizeof(ps)/sizeof(ps[0]), sizeof(int), cmp);
    for(int i=0;i<n;i++){
      int divable = 0;
      for(int j=0;j<i+2;j++){
        if (j < n && i != j && ps[i] == (ps[i]/ps[j])*ps[j]){
          divable = 1;
        }
      }
      if (divable == 0){
        num += 1; 
      }
    }
    printf("%d", num);
    return 0;
}



