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