#include <bits/stdc++.h>
using namespace std;
int prime_judge(int n, int p[]) {
  int ans = 0;
  double nd = (double)n;
  nd = sqrt(nd);
  int m = (int)nd;
  for (int i = 0; i < m; i++) {
    if (p[i] > 0) {
      for (int j = i + 1; j < n; j++) {
        if (p[j] % p[i] == 0) p[j] = 0;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    if (p[i] > 0) ans += 1;
  }
  return ans;
}
int main() {
  int n;
  cin >> n;
  int p[n];
  for (int i = 0; i < n; i++) {
    cin >> p[i];
  }
  cout << prime_judge(n, p) << endl;
}
