#include <bits/stdc++.h>
int main() {
  int n, cnt = 1, i, j;
  long long int d, prime[1000];
  scanf("%d", &n);
  prime[0] = 2;
  for (i = 0; i < n; i++) {
    scanf("%lld", &d);
    for (j = 0; j < cnt; j++) {
      if (d % prime[j] == 0) break;
      if (j == cnt - 1) {
        prime[cnt++] = d;
      }
    }
  }
  printf("%d\n", cnt);
  return 0;
}
