#include <stdio.h>

int main(){
  int n;
  int a[1000000];
  int i, j;
  int count = 0;
  
  scanf("%d", &n);
  
  for(i = 0; i < n; i++){
    scanf("%d", &a[i]);
  }
  
  for(i = 0; i < n; i++){
    for(j = 0; j < n; j++){
      if(j == i)
        continue;
      else{
        if(a[i] < a[j])
          continue;
        
        if(a[i] % a[j] == 0)
          goto OUT;
      }
    }
    count++;
    
    OUT:
    continue;
  }
  
  printf("%d\n", count);
  
  return 0;
}