#include <bits/stdc++.h>
using namespace std;
long long int ar[1000000];
int main() {
  long long int n, ans = 0;
  cin >> n;
  vector<long long int> v(n);
  map<long long int, long long int> mp, mpp;
  for (long long int i = 0; i < n; i++) {
    cin >> v[i];
    mp[v[i]] = 1;
  }
  sort(v.begin(), v.end());
  for (long long int i = 0; i < n; i++) {
    if (!mpp[v[i]]) {
      ans++;
      for (long long int j = v[i]; j <= 100; j += v[i]) {
        if (mp[j]) mpp[j] = 1;
      }
    }
  }
  cout << ans << endl;
}
