#include <bits/stdc++.h>
int a;
unsigned int num[10001];
unsigned int j = 2;
int counter = 0;
int main(void) {
  scanf("%d", &a);
  for (int i = 0; i < a; i++) {
    scanf("%d", &num[i]);
  }
  for (int i = 0; i < a; i++) {
    while (num[i] % j != 0) {
      j++;
      if (num[i] == j) {
        counter++;
        break;
      }
    }
    j = 2;
  }
  printf("%d\n", counter + 1);
  return 0;
}
