#include<stdio.h>
#include<stdlib.h>
int main(void){

  int i,j,flag = 0,count = 0;
  int n,*a;
  scanf("%d",&n);
  a = (int*)malloc(sizeof(int)*n);
  
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
  }
 
  for(i=0;i<n;i++){
   for(j=0;j<n;j++){
   
     if(i != j){
       if(a[i] >= a[j] && a[i] % a[j] == 0) flag = 1;
     }
   }   
    
     if(flag==0){
      count++;
     }     
    flag = 0;
       
  }
  
       printf("%d",count);
  
 free(a);
 return 0; 
}