#include <bits/stdc++.h>
using namespace std;
vector<long long> findSum(string str) {
  vector<long long> v;
  string temp = "";
  for (char ch : str) {
    if (isdigit(ch))
      temp += ch;
    else {
      v.push_back(atoi(temp.c_str()));
      temp = "";
    }
  }
  v.push_back(atoi(temp.c_str()));
  return v;
}
int main() {
  long long n, k;
  cin >> n;
  k = n;
  bool vis[n + 1];
  memset(vis, false, sizeof(vis));
  vector<long long> v;
  for (long long i = 0; i < n; i = i + 1) {
    long long h;
    cin >> h;
    v.push_back(h);
  }
  sort(v.begin(), v.end());
  long long ans = 0;
  for (long long i = 0; i < n; i++) {
    if (vis[i] == false) {
      vis[i] = true;
      for (long long j = i + 1; j < n; j++) {
        if (vis[j] == false && v[j] % v[i] == 0) {
          vis[j] = true;
        }
      }
      ans++;
    }
  }
  cout << ans << endl;
}
