import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		//prime numbers
		Scanner in = new Scanner(System.in);
	      int prime =0;
	      int n = in.nextInt();
	      int[] array = new int[n];
	      for(int i =0;i<n;i++){
	         array[i]= in.nextInt();
	      }
	      for(int j = 0; j<n;j++){
	    	  Boolean primeN = true;
	         for(int x = 2;x<Math.sqrt(array[j]+1);x++) {
	        	 if(array[j]%x==0) {
	        		 primeN = false;
	        	 }
	         }
	         if(primeN==true) {
	        	 prime+=1;
	         }
	         
	      }
	      System.out.println(prime);
}} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		//prime numbers
		Scanner in = new Scanner(System.in);
	      int prime =0;
	      int n = in.nextInt();
	      int[] array = new int[n];
	      for(int i =0;i<n;i++){
	         array[i]= in.nextInt();
	      }
	      for(int j = 0; j<n;j++){
	    	  Boolean primeN = true;
	         for(int x = 2;x<Math.sqrt(array[j]+1);x++) {
	        	 if(array[j]%x==0) {
	        		 primeN = false;
	        	 }
	         }
	         if(primeN==true) {
	        	 prime+=1;
	         }
	         
	      }
	      System.out.println(prime);
}} Main public static void main(String[] args) {
		//prime numbers
		Scanner in = new Scanner(System.in);
	      int prime =0;
	      int n = in.nextInt();
	      int[] array = new int[n];
	      for(int i =0;i<n;i++){
	         array[i]= in.nextInt();
	      }
	      for(int j = 0; j<n;j++){
	    	  Boolean primeN = true;
	         for(int x = 2;x<Math.sqrt(array[j]+1);x++) {
	        	 if(array[j]%x==0) {
	        		 primeN = false;
	        	 }
	         }
	         if(primeN==true) {
	        	 prime+=1;
	         }
	         
	      }
	      System.out.println(prime);
} main {
		//prime numbers
		Scanner in = new Scanner(System.in);
	      int prime =0;
	      int n = in.nextInt();
	      int[] array = new int[n];
	      for(int i =0;i<n;i++){
	         array[i]= in.nextInt();
	      }
	      for(int j = 0; j<n;j++){
	    	  Boolean primeN = true;
	         for(int x = 2;x<Math.sqrt(array[j]+1);x++) {
	        	 if(array[j]%x==0) {
	        		 primeN = false;
	        	 }
	         }
	         if(primeN==true) {
	        	 prime+=1;
	         }
	         
	      }
	      System.out.println(prime);
} Scanner in = new Scanner(System.in); in new Scanner(System.in) int prime =0; prime 0 int n = in.nextInt(); n in.nextInt() in.nextInt in int[] array = new int[n]; array new int[n] n for(int i =0;i<n;i++){
	         array[i]= in.nextInt();
	      } int i =0; int i =0; i 0 i<n i n i++ i++ i {
	         array[i]= in.nextInt();
	      } {
	         array[i]= in.nextInt();
	      } array[i]= in.nextInt() array[i] array i in.nextInt() in.nextInt in for(int j = 0; j<n;j++){
	    	  Boolean primeN = true;
	         for(int x = 2;x<Math.sqrt(array[j]+1);x++) {
	        	 if(array[j]%x==0) {
	        		 primeN = false;
	        	 }
	         }
	         if(primeN==true) {
	        	 prime+=1;
	         }
	         
	      } int j = 0; int j = 0; j 0 j<n j n j++ j++ j {
	    	  Boolean primeN = true;
	         for(int x = 2;x<Math.sqrt(array[j]+1);x++) {
	        	 if(array[j]%x==0) {
	        		 primeN = false;
	        	 }
	         }
	         if(primeN==true) {
	        	 prime+=1;
	         }
	         
	      } {
	    	  Boolean primeN = true;
	         for(int x = 2;x<Math.sqrt(array[j]+1);x++) {
	        	 if(array[j]%x==0) {
	        		 primeN = false;
	        	 }
	         }
	         if(primeN==true) {
	        	 prime+=1;
	         }
	         
	      } Boolean primeN = true; primeN true for(int x = 2;x<Math.sqrt(array[j]+1);x++) {
	        	 if(array[j]%x==0) {
	        		 primeN = false;
	        	 }
	         } int x = 2; int x = 2; x 2 x<Math.sqrt(array[j]+1) x Math.sqrt(array[j]+1) Math.sqrt Math array[j]+1 array[j] array j 1 x++ x++ x {
	        	 if(array[j]%x==0) {
	        		 primeN = false;
	        	 }
	         } {
	        	 if(array[j]%x==0) {
	        		 primeN = false;
	        	 }
	         } if(array[j]%x==0) {
	        		 primeN = false;
	        	 } array[j]%x==0 array[j]%x array[j] array j x 0 {
	        		 primeN = false;
	        	 } primeN = false primeN false if(primeN==true) {
	        	 prime+=1;
	         } primeN==true primeN true {
	        	 prime+=1;
	         } prime+=1 prime 1 System.out.println(prime) System.out.println System.out System System.out prime String[] args args public class Main {

	public static void main(String[] args) {
		//prime numbers
		Scanner in = new Scanner(System.in);
	      int prime =0;
	      int n = in.nextInt();
	      int[] array = new int[n];
	      for(int i =0;i<n;i++){
	         array[i]= in.nextInt();
	      }
	      for(int j = 0; j<n;j++){
	    	  Boolean primeN = true;
	         for(int x = 2;x<Math.sqrt(array[j]+1);x++) {
	        	 if(array[j]%x==0) {
	        		 primeN = false;
	        	 }
	         }
	         if(primeN==true) {
	        	 prime+=1;
	         }
	         
	      }
	      System.out.println(prime);
}} public class Main {

	public static void main(String[] args) {
		//prime numbers
		Scanner in = new Scanner(System.in);
	      int prime =0;
	      int n = in.nextInt();
	      int[] array = new int[n];
	      for(int i =0;i<n;i++){
	         array[i]= in.nextInt();
	      }
	      for(int j = 0; j<n;j++){
	    	  Boolean primeN = true;
	         for(int x = 2;x<Math.sqrt(array[j]+1);x++) {
	        	 if(array[j]%x==0) {
	        		 primeN = false;
	        	 }
	         }
	         if(primeN==true) {
	        	 prime+=1;
	         }
	         
	      }
	      System.out.println(prime);
}} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		//prime numbers
		Scanner in = new Scanner(System.in);
	      int prime =0;
	      int n = in.nextInt();
	      int[] array = new int[n];
	      for(int i =0;i<n;i++){
	         array[i]= in.nextInt();
	      }
	      for(int j = 0; j<n;j++){
	    	  Boolean primeN = true;
	         for(int x = 2;x<Math.sqrt(array[j]+1);x++) {
	        	 if(array[j]%x==0) {
	        		 primeN = false;
	        	 }
	         }
	         if(primeN==true) {
	        	 prime+=1;
	         }
	         
	      }
	      System.out.println(prime);
}}
