#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long n;
  cin >> n;
  vector<long long> v(n);
  for (long long i = 0; i < n; i++) {
    cin >> v[i];
  }
  sort(v.begin(), v.end());
  long long count = 0;
  while (v.size() > 0) {
    count++;
    long long num = v[0];
    for (long long i = 0; i < v.size(); i++) {
      if (v[i] % num == 0) {
        v.erase(v.begin() + i, v.begin() + i + 1);
        i--;
      }
    }
  }
  cout << count << endl;
  return 0;
}
