#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  long long ans = n;
  vector<long long> v(n);
  for (long long i = 0; i < n; ++i) cin >> v[i];
  sort(v.begin(), v.end());
  for (long long i = 0; i < n; ++i) {
    if (v[i] == 0) continue;
    for (long long j = i + 1; j < n; ++j) {
      if (v[j] == 0)
        continue;
      else if (v[j] % v[i] == 0) {
        v[j] = 0;
        --ans;
      }
    }
  }
  cout << ans << '\n';
  return 0;
}
