#include <bits/stdc++.h>
int main() {
  int i, j, n, c = 0, ans = 0;
  int *A;
  scanf("%d", &n);
  A = (int *)malloc(sizeof(int) * n);
  for (i = 0; i < n; i++) scanf("%d", &A[i]);
  for (i = 0; i < n; i++) {
    for (j = 2; j <= A[i]; j++) {
      ans = A[i] % j;
      if (ans == 0 && j < A[i])
        break;
      else if (ans == 0 && j == A[i])
        c++;
    }
  }
  printf("%d\n", c);
  return 0;
}
