#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  sort(a.begin(), a.end());
  int how = 0;
  vector<bool> used(n, false);
  for (int i = 0; i < n; ++i) {
    if (!used[i]) {
      ++how;
      for (int j = i; j < n; ++j) {
        if (a[j] % a[i] == 0) {
          used[j] = true;
        }
      }
    }
  }
  cout << how;
}
