import java.io.*;
import java.util.*;

class Main{
    public static void main(String[] args) throws Exception{
	int i=0;
	int Prime_COUNT = 0;
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	
	String str_A = br.readLine();
	
	int n = Integer.parseInt(str_A);
	
	int A[];
	A = new int[n];
	 
	for(i=0;i<A.length;i++){
	    String a = br.readLine();
	    A[i] = Integer.parseInt(a);
	}
	
	for(i=0;i<A.length;i++){
	    isPrime(A[i]);
	    if(isPrime(A[i]) == true) Prime_COUNT++;
	}
	
	System.out.println(Prime_COUNT);
	return ;
    }

    public static boolean isPrime(int x){
	if(x == 2) return true;
	if(x<2 || x%2 == 0) return false;

	int i = 3;
	while(i<= Math.sqrt((double)x)){
	    if(x%i == 0) return false;
	    i = i+2;
	}

	return true;
    }
}
      
 import java.io.*; io.* java import java.util.*; util.* java class Main{
    public static void main(String[] args) throws Exception{
	int i=0;
	int Prime_COUNT = 0;
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	
	String str_A = br.readLine();
	
	int n = Integer.parseInt(str_A);
	
	int A[];
	A = new int[n];
	 
	for(i=0;i<A.length;i++){
	    String a = br.readLine();
	    A[i] = Integer.parseInt(a);
	}
	
	for(i=0;i<A.length;i++){
	    isPrime(A[i]);
	    if(isPrime(A[i]) == true) Prime_COUNT++;
	}
	
	System.out.println(Prime_COUNT);
	return ;
    }

    public static boolean isPrime(int x){
	if(x == 2) return true;
	if(x<2 || x%2 == 0) return false;

	int i = 3;
	while(i<= Math.sqrt((double)x)){
	    if(x%i == 0) return false;
	    i = i+2;
	}

	return true;
    }
} Main public static void main(String[] args) throws Exception{
	int i=0;
	int Prime_COUNT = 0;
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	
	String str_A = br.readLine();
	
	int n = Integer.parseInt(str_A);
	
	int A[];
	A = new int[n];
	 
	for(i=0;i<A.length;i++){
	    String a = br.readLine();
	    A[i] = Integer.parseInt(a);
	}
	
	for(i=0;i<A.length;i++){
	    isPrime(A[i]);
	    if(isPrime(A[i]) == true) Prime_COUNT++;
	}
	
	System.out.println(Prime_COUNT);
	return ;
    } main {
	int i=0;
	int Prime_COUNT = 0;
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	
	String str_A = br.readLine();
	
	int n = Integer.parseInt(str_A);
	
	int A[];
	A = new int[n];
	 
	for(i=0;i<A.length;i++){
	    String a = br.readLine();
	    A[i] = Integer.parseInt(a);
	}
	
	for(i=0;i<A.length;i++){
	    isPrime(A[i]);
	    if(isPrime(A[i]) == true) Prime_COUNT++;
	}
	
	System.out.println(Prime_COUNT);
	return ;
    } int i=0; i 0 int Prime_COUNT = 0; Prime_COUNT 0 BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str_A = br.readLine(); str_A br.readLine() br.readLine br int n = Integer.parseInt(str_A); n Integer.parseInt(str_A) Integer.parseInt Integer str_A int A[]; A A = new int[n] A new int[n] n for(i=0;i<A.length;i++){
	    String a = br.readLine();
	    A[i] = Integer.parseInt(a);
	} i=0; i=0 i 0 i<A.length i A.length A A.length i++ i++ i {
	    String a = br.readLine();
	    A[i] = Integer.parseInt(a);
	} {
	    String a = br.readLine();
	    A[i] = Integer.parseInt(a);
	} String a = br.readLine(); a br.readLine() br.readLine br A[i] = Integer.parseInt(a) A[i] A i Integer.parseInt(a) Integer.parseInt Integer a for(i=0;i<A.length;i++){
	    isPrime(A[i]);
	    if(isPrime(A[i]) == true) Prime_COUNT++;
	} i=0; i=0 i 0 i<A.length i A.length A A.length i++ i++ i {
	    isPrime(A[i]);
	    if(isPrime(A[i]) == true) Prime_COUNT++;
	} {
	    isPrime(A[i]);
	    if(isPrime(A[i]) == true) Prime_COUNT++;
	} isPrime(A[i]) isPrime A[i] A i if(isPrime(A[i]) == true) Prime_COUNT++; isPrime(A[i]) == true isPrime(A[i]) isPrime A[i] A i true Prime_COUNT++ Prime_COUNT System.out.println(Prime_COUNT) System.out.println System.out System System.out Prime_COUNT return ; String[] args args public static boolean isPrime(int x){
	if(x == 2) return true;
	if(x<2 || x%2 == 0) return false;

	int i = 3;
	while(i<= Math.sqrt((double)x)){
	    if(x%i == 0) return false;
	    i = i+2;
	}

	return true;
    } isPrime {
	if(x == 2) return true;
	if(x<2 || x%2 == 0) return false;

	int i = 3;
	while(i<= Math.sqrt((double)x)){
	    if(x%i == 0) return false;
	    i = i+2;
	}

	return true;
    } if(x == 2) return true; x == 2 x 2 return true; true if(x<2 || x%2 == 0) return false; x<2 || x%2 == 0 x<2 x 2 x%2 == 0 x%2 x 2 0 return false; false int i = 3; i 3 while(i<= Math.sqrt((double)x)){
	    if(x%i == 0) return false;
	    i = i+2;
	} i<= Math.sqrt((double)x) i Math.sqrt((double)x) Math.sqrt Math (double)x {
	    if(x%i == 0) return false;
	    i = i+2;
	} if(x%i == 0) return false; x%i == 0 x%i x i 0 return false; false i = i+2 i i+2 i 2 return true; true int x x
import java.io.*;
import java.util.*;

class Main{
    public static void main(String[] args) throws Exception{
	int i=0;
	int Prime_COUNT = 0;
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	
	String str_A = br.readLine();
	
	int n = Integer.parseInt(str_A);
	
	int A[];
	A = new int[n];
	 
	for(i=0;i<A.length;i++){
	    String a = br.readLine();
	    A[i] = Integer.parseInt(a);
	}
	
	for(i=0;i<A.length;i++){
	    isPrime(A[i]);
	    if(isPrime(A[i]) == true) Prime_COUNT++;
	}
	
	System.out.println(Prime_COUNT);
	return ;
    }

    public static boolean isPrime(int x){
	if(x == 2) return true;
	if(x<2 || x%2 == 0) return false;

	int i = 3;
	while(i<= Math.sqrt((double)x)){
	    if(x%i == 0) return false;
	    i = i+2;
	}

	return true;
    }
}
      

