int main(void)
{
  int i,j,k,N;
  int cnt=0;
  scanf("%d",&N);
  int a[10000];
  for(i=3;i<=N*2+1;i+=2){
    scanf("%d",&a[i]);
  }
  for(i=3;i<=N*2+1;i+=2){
    k=0;
    for(j=3;j<a[i];j+=2){
      if(a[i]%j==0){
	k=1;
	break;
      }
      if(k==0){
	cnt++;
      }
    }
  }
  printf("%d",cnt);

  return 0;
}

