import java.util.Scanner;

public class Main{


	public static boolean isPrime(int num){
		//?´???°????????¶
		//????????????????°?????????´??°??§??????????????????
		if(num==1)return false;
		if(num==2)return true;
		if(num%2==0)return false;

		for(int i=3;i*i<=num;i+=2){
			if(num%i==0)return false;
		}

		return true;
	}



	public static void main(String[] args){

		int N;
		int box, cnt;

		Scanner scan=new Scanner(System.in);
		N=scan.nextInt();

		cnt=0;
		for(int i=0;i<N;i++){
		box=scan.nextInt();

		if(isPrime(box)){cnt++;}
		}

		System.out.println(cnt);

		scan.close();

	}

} import java.util.Scanner; Scanner java.util public class Main{


	public static boolean isPrime(int num){
		//?´???°????????¶
		//????????????????°?????????´??°??§??????????????????
		if(num==1)return false;
		if(num==2)return true;
		if(num%2==0)return false;

		for(int i=3;i*i<=num;i+=2){
			if(num%i==0)return false;
		}

		return true;
	}



	public static void main(String[] args){

		int N;
		int box, cnt;

		Scanner scan=new Scanner(System.in);
		N=scan.nextInt();

		cnt=0;
		for(int i=0;i<N;i++){
		box=scan.nextInt();

		if(isPrime(box)){cnt++;}
		}

		System.out.println(cnt);

		scan.close();

	}

} Main public static boolean isPrime(int num){
		//?´???°????????¶
		//????????????????°?????????´??°??§??????????????????
		if(num==1)return false;
		if(num==2)return true;
		if(num%2==0)return false;

		for(int i=3;i*i<=num;i+=2){
			if(num%i==0)return false;
		}

		return true;
	} isPrime {
		//?´???°????????¶
		//????????????????°?????????´??°??§??????????????????
		if(num==1)return false;
		if(num==2)return true;
		if(num%2==0)return false;

		for(int i=3;i*i<=num;i+=2){
			if(num%i==0)return false;
		}

		return true;
	} if(num==1)return false; num==1 num 1 return false; false if(num==2)return true; num==2 num 2 return true; true if(num%2==0)return false; num%2==0 num%2 num 2 0 return false; false for(int i=3;i*i<=num;i+=2){
			if(num%i==0)return false;
		} int i=3; int i=3; i 3 i*i<=num i*i i i num i+=2 i+=2 i 2 {
			if(num%i==0)return false;
		} {
			if(num%i==0)return false;
		} if(num%i==0)return false; num%i==0 num%i num i 0 return false; false return true; true int num num public static void main(String[] args){

		int N;
		int box, cnt;

		Scanner scan=new Scanner(System.in);
		N=scan.nextInt();

		cnt=0;
		for(int i=0;i<N;i++){
		box=scan.nextInt();

		if(isPrime(box)){cnt++;}
		}

		System.out.println(cnt);

		scan.close();

	} main {

		int N;
		int box, cnt;

		Scanner scan=new Scanner(System.in);
		N=scan.nextInt();

		cnt=0;
		for(int i=0;i<N;i++){
		box=scan.nextInt();

		if(isPrime(box)){cnt++;}
		}

		System.out.println(cnt);

		scan.close();

	} int N; N int box box cnt; cnt Scanner scan=new Scanner(System.in); scan new Scanner(System.in) N=scan.nextInt() N scan.nextInt() scan.nextInt scan cnt=0 cnt 0 for(int i=0;i<N;i++){
		box=scan.nextInt();

		if(isPrime(box)){cnt++;}
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
		box=scan.nextInt();

		if(isPrime(box)){cnt++;}
		} {
		box=scan.nextInt();

		if(isPrime(box)){cnt++;}
		} box=scan.nextInt() box scan.nextInt() scan.nextInt scan if(isPrime(box)){cnt++;} isPrime(box) isPrime box {cnt++;} cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt scan.close() scan.close scan String[] args args public class Main{


	public static boolean isPrime(int num){
		//?´???°????????¶
		//????????????????°?????????´??°??§??????????????????
		if(num==1)return false;
		if(num==2)return true;
		if(num%2==0)return false;

		for(int i=3;i*i<=num;i+=2){
			if(num%i==0)return false;
		}

		return true;
	}



	public static void main(String[] args){

		int N;
		int box, cnt;

		Scanner scan=new Scanner(System.in);
		N=scan.nextInt();

		cnt=0;
		for(int i=0;i<N;i++){
		box=scan.nextInt();

		if(isPrime(box)){cnt++;}
		}

		System.out.println(cnt);

		scan.close();

	}

} public class Main{


	public static boolean isPrime(int num){
		//?´???°????????¶
		//????????????????°?????????´??°??§??????????????????
		if(num==1)return false;
		if(num==2)return true;
		if(num%2==0)return false;

		for(int i=3;i*i<=num;i+=2){
			if(num%i==0)return false;
		}

		return true;
	}



	public static void main(String[] args){

		int N;
		int box, cnt;

		Scanner scan=new Scanner(System.in);
		N=scan.nextInt();

		cnt=0;
		for(int i=0;i<N;i++){
		box=scan.nextInt();

		if(isPrime(box)){cnt++;}
		}

		System.out.println(cnt);

		scan.close();

	}

} Main
import java.util.Scanner;

public class Main{


	public static boolean isPrime(int num){
		//?´???°????????¶
		//????????????????°?????????´??°??§??????????????????
		if(num==1)return false;
		if(num==2)return true;
		if(num%2==0)return false;

		for(int i=3;i*i<=num;i+=2){
			if(num%i==0)return false;
		}

		return true;
	}



	public static void main(String[] args){

		int N;
		int box, cnt;

		Scanner scan=new Scanner(System.in);
		N=scan.nextInt();

		cnt=0;
		for(int i=0;i<N;i++){
		box=scan.nextInt();

		if(isPrime(box)){cnt++;}
		}

		System.out.println(cnt);

		scan.close();

	}

}