#include <bits/stdc++.h>
using namespace std;
bool isPrime(int *list, int n, int c) {
  if (n == 2) {
    return true;
  }
  for (int i = 0; i < c; i++) {
    if (n % list[i] == 0) return false;
  }
  return true;
}
int main() {
  int n, c = 0, v;
  cin >> n;
  int m[n];
  for (int i = 0; i < n; i++) {
    cin >> v;
    if (isPrime(m, v, c)) {
      c++;
      m[c] = v;
    }
  }
  cout << c << endl;
  return 0;
}
