


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class Main{
  public static void main(String args[]) throws IOException{
   BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

   int n = Integer.parseInt( br.readLine() );

   int answer = 0;

   for(int i = 0 ; i < n; i++){
      int x = Integer.parseInt( br.readLine() );
      int flag = 0;

      if(x == 2){
    	flag = 0;

      }else if( x%2 == 0 || x < 2){
    	flag = 1;

       }else{

       double sqrt = Math.sqrt(x);
       for(int j = 3; j <= sqrt; j = j+2){
    	 if(x % j ==0){
    		flag = 1;

    		break;
    	 }
        }

       }


    	if(flag == 0){

    		answer++;

    	}

   }



   System.out.println(answer);
 }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io class Main{
  public static void main(String args[]) throws IOException{
   BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

   int n = Integer.parseInt( br.readLine() );

   int answer = 0;

   for(int i = 0 ; i < n; i++){
      int x = Integer.parseInt( br.readLine() );
      int flag = 0;

      if(x == 2){
    	flag = 0;

      }else if( x%2 == 0 || x < 2){
    	flag = 1;

       }else{

       double sqrt = Math.sqrt(x);
       for(int j = 3; j <= sqrt; j = j+2){
    	 if(x % j ==0){
    		flag = 1;

    		break;
    	 }
        }

       }


    	if(flag == 0){

    		answer++;

    	}

   }



   System.out.println(answer);
 }
} Main public static void main(String args[]) throws IOException{
   BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

   int n = Integer.parseInt( br.readLine() );

   int answer = 0;

   for(int i = 0 ; i < n; i++){
      int x = Integer.parseInt( br.readLine() );
      int flag = 0;

      if(x == 2){
    	flag = 0;

      }else if( x%2 == 0 || x < 2){
    	flag = 1;

       }else{

       double sqrt = Math.sqrt(x);
       for(int j = 3; j <= sqrt; j = j+2){
    	 if(x % j ==0){
    		flag = 1;

    		break;
    	 }
        }

       }


    	if(flag == 0){

    		answer++;

    	}

   }



   System.out.println(answer);
 } main {
   BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

   int n = Integer.parseInt( br.readLine() );

   int answer = 0;

   for(int i = 0 ; i < n; i++){
      int x = Integer.parseInt( br.readLine() );
      int flag = 0;

      if(x == 2){
    	flag = 0;

      }else if( x%2 == 0 || x < 2){
    	flag = 1;

       }else{

       double sqrt = Math.sqrt(x);
       for(int j = 3; j <= sqrt; j = j+2){
    	 if(x % j ==0){
    		flag = 1;

    		break;
    	 }
        }

       }


    	if(flag == 0){

    		answer++;

    	}

   }



   System.out.println(answer);
 } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt( br.readLine() ); n Integer.parseInt( br.readLine() ) Integer.parseInt Integer br.readLine() br.readLine br int answer = 0; answer 0 for(int i = 0 ; i < n; i++){
      int x = Integer.parseInt( br.readLine() );
      int flag = 0;

      if(x == 2){
    	flag = 0;

      }else if( x%2 == 0 || x < 2){
    	flag = 1;

       }else{

       double sqrt = Math.sqrt(x);
       for(int j = 3; j <= sqrt; j = j+2){
    	 if(x % j ==0){
    		flag = 1;

    		break;
    	 }
        }

       }


    	if(flag == 0){

    		answer++;

    	}

   } int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
      int x = Integer.parseInt( br.readLine() );
      int flag = 0;

      if(x == 2){
    	flag = 0;

      }else if( x%2 == 0 || x < 2){
    	flag = 1;

       }else{

       double sqrt = Math.sqrt(x);
       for(int j = 3; j <= sqrt; j = j+2){
    	 if(x % j ==0){
    		flag = 1;

    		break;
    	 }
        }

       }


    	if(flag == 0){

    		answer++;

    	}

   } {
      int x = Integer.parseInt( br.readLine() );
      int flag = 0;

      if(x == 2){
    	flag = 0;

      }else if( x%2 == 0 || x < 2){
    	flag = 1;

       }else{

       double sqrt = Math.sqrt(x);
       for(int j = 3; j <= sqrt; j = j+2){
    	 if(x % j ==0){
    		flag = 1;

    		break;
    	 }
        }

       }


    	if(flag == 0){

    		answer++;

    	}

   } int x = Integer.parseInt( br.readLine() ); x Integer.parseInt( br.readLine() ) Integer.parseInt Integer br.readLine() br.readLine br int flag = 0; flag 0 if(x == 2){
    	flag = 0;

      }else if( x%2 == 0 || x < 2){
    	flag = 1;

       }else{

       double sqrt = Math.sqrt(x);
       for(int j = 3; j <= sqrt; j = j+2){
    	 if(x % j ==0){
    		flag = 1;

    		break;
    	 }
        }

       } x == 2 x 2 {
    	flag = 0;

      } flag = 0 flag 0 if( x%2 == 0 || x < 2){
    	flag = 1;

       }else{

       double sqrt = Math.sqrt(x);
       for(int j = 3; j <= sqrt; j = j+2){
    	 if(x % j ==0){
    		flag = 1;

    		break;
    	 }
        }

       } x%2 == 0 || x < 2 x%2 == 0 x%2 x 2 0 x < 2 x 2 {
    	flag = 1;

       } flag = 1 flag 1 {

       double sqrt = Math.sqrt(x);
       for(int j = 3; j <= sqrt; j = j+2){
    	 if(x % j ==0){
    		flag = 1;

    		break;
    	 }
        }

       } double sqrt = Math.sqrt(x); sqrt Math.sqrt(x) Math.sqrt Math x for(int j = 3; j <= sqrt; j = j+2){
    	 if(x % j ==0){
    		flag = 1;

    		break;
    	 }
        } int j = 3; int j = 3; j 3 j <= sqrt j sqrt j = j+2 j = j+2 j j+2 j 2 {
    	 if(x % j ==0){
    		flag = 1;

    		break;
    	 }
        } {
    	 if(x % j ==0){
    		flag = 1;

    		break;
    	 }
        } if(x % j ==0){
    		flag = 1;

    		break;
    	 } x % j ==0 x % j x j 0 {
    		flag = 1;

    		break;
    	 } flag = 1 flag 1 break; if(flag == 0){

    		answer++;

    	} flag == 0 flag 0 {

    		answer++;

    	} answer++ answer System.out.println(answer) System.out.println System.out System System.out answer String args[] args



import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class Main{
  public static void main(String args[]) throws IOException{
   BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

   int n = Integer.parseInt( br.readLine() );

   int answer = 0;

   for(int i = 0 ; i < n; i++){
      int x = Integer.parseInt( br.readLine() );
      int flag = 0;

      if(x == 2){
    	flag = 0;

      }else if( x%2 == 0 || x < 2){
    	flag = 1;

       }else{

       double sqrt = Math.sqrt(x);
       for(int j = 3; j <= sqrt; j = j+2){
    	 if(x % j ==0){
    		flag = 1;

    		break;
    	 }
        }

       }


    	if(flag == 0){

    		answer++;

    	}

   }



   System.out.println(answer);
 }
}