#include <bits/stdc++.h>
using namespace std;
long long arr[20000007];
void init() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
int main() {
  init();
  long long t;
  t = 1;
  while (t--) {
    long long n;
    cin >> n;
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
    }
    sort(arr, arr + n);
    long long count = 0;
    int vis[n];
    memset(vis, 0, sizeof(vis));
    long long k = 1;
    for (int i = 0; i < n; i++) {
      if (vis[i] != 0)
        continue;
      else {
        for (int j = i + 1; j < n; j++) {
          if (arr[j] % arr[i] == 0) {
            vis[j] = k;
          }
        }
        vis[i] = k;
        k++;
      }
    }
    set<long long> s;
    for (int i = 0; i < n; i++) {
      s.insert(vis[i]);
    }
    cout << s.size() - s.count(0) << endl;
  }
  return 0;
}
