#include <bits/stdc++.h>
#include <string.h>

#include <iostream>

std::unordered_map<long, int> mp;

int main(void) {
  long n;
  long a[200010] = {0};
  int flg = 0;
  int cnt = 0;
  long b[200010] = {0};

  scanf("%ld", &n);

  for (long i = 0; i < n; i++) {
    scanf("%ld", &a[i]);
  }

  std::sort(a, a + n);

  for (long i = 0; i < n; i++) {
    mp[a[i]]=1;
  //  printf("%ld ", a[i]);
  }

  if(a[0] == a[1]){
    b[0] = 1;
  }

  for (long i = 0; i < n - 1; i++) {
    if(mp[a[i]]==0) continue;
    for(long j=2;;j++){
      if(a[j]*j>a[n-1]) break;
      mp[a[i]*j]=0;
    }
  }

  for(long j = 0; j < n; j++){
    if (mp[a[j]l!=0) {
      cnt++;
    }
  }

  printf("%d", cnt);

  return 0;
}
