#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main(){
  int n;
  cin >> n ;
  vector<ll> a(n);
  for(int i= 0; i< n; i++)cin >> a[i];
  sort(a.begin(), a.end());
  ll amax = a[n-1];
  vector<ll> p(amax+5);

 for(int i =0; i< n; i++){
   for(int j = a[i]; j < amax + 5 ; j += a[i]){
      p[j]++;
    }
 }
ll ans = 0;
 for(auto x :a){
    if(p[x]==1) ans ++;
 }
cout << ans << endl;
  return 0;
}