#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<long long int> v;
  long long int n, c = 0;
  cin >> n;
  long long int a[n];
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
    v.push_back(a[i]);
  }
  sort(v.begin(), v.end());
  for (long long int i = 0; i < n - 1; i++) {
    for (long long int j = i + 1; j < n; j++) {
      if (v[j] > 0 && v[i] > 0) {
        if (v[j] % v[i] == 0) {
          v[j] = 0;
        }
      }
    }
  }
  for (long long int k = 0; k < v.size(); k++) {
    if (v[k] > 0) c++;
  }
  cout << c << endl;
}
