#include <bits/stdc++.h>
using namespace std;
template <typename T>
void printvec(vector<T>& vec) {
  for (int i = 0; i < vec.size(); ++i) {
    cout << vec[i] << " ";
  }
  cout << '\n';
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; ++i) {
    cin >> v[i];
  }
  sort(v.begin(), v.end());
  int cnt = 0;
  vector<bool> vis(n);
  for (int i = 0; i < n; ++i) {
    vis[i] = true;
  }
  for (int i = 0; i < n; ++i) {
    if (vis[i]) {
      vis[i] = false;
      cnt++;
      for (int j = i + 1; j < n; ++j) {
        if (v[j] % v[i] == 0) vis[j] = false;
      }
    }
  }
  cout << cnt;
  return 0;
}
