
import java.util.*;
public class Main {

	public static void main(String[] args) {
		  Scanner cin=new Scanner(System.in);
		  List<Integer> list=new ArrayList<>();
		  int n=cin.nextInt(),res=0;
		  for(int i=0;i<n;i++)list.add(cin.nextInt());
		  
		  for(int i=0;i<n;i++) {
			  int x=list.get(i),limit=(int)(Math.sqrt(x)),j;
			  
			  for(j=limit;j>1;j--) {
				  if(x%j==0)break;
			  }
			  
			  if(j==1)res++;
			  
		  }
		  
		  System.out.println(res);
		  
	}

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

	public static void main(String[] args) {
		  Scanner cin=new Scanner(System.in);
		  List<Integer> list=new ArrayList<>();
		  int n=cin.nextInt(),res=0;
		  for(int i=0;i<n;i++)list.add(cin.nextInt());
		  
		  for(int i=0;i<n;i++) {
			  int x=list.get(i),limit=(int)(Math.sqrt(x)),j;
			  
			  for(j=limit;j>1;j--) {
				  if(x%j==0)break;
			  }
			  
			  if(j==1)res++;
			  
		  }
		  
		  System.out.println(res);
		  
	}

} Main public static void main(String[] args) {
		  Scanner cin=new Scanner(System.in);
		  List<Integer> list=new ArrayList<>();
		  int n=cin.nextInt(),res=0;
		  for(int i=0;i<n;i++)list.add(cin.nextInt());
		  
		  for(int i=0;i<n;i++) {
			  int x=list.get(i),limit=(int)(Math.sqrt(x)),j;
			  
			  for(j=limit;j>1;j--) {
				  if(x%j==0)break;
			  }
			  
			  if(j==1)res++;
			  
		  }
		  
		  System.out.println(res);
		  
	} main {
		  Scanner cin=new Scanner(System.in);
		  List<Integer> list=new ArrayList<>();
		  int n=cin.nextInt(),res=0;
		  for(int i=0;i<n;i++)list.add(cin.nextInt());
		  
		  for(int i=0;i<n;i++) {
			  int x=list.get(i),limit=(int)(Math.sqrt(x)),j;
			  
			  for(j=limit;j>1;j--) {
				  if(x%j==0)break;
			  }
			  
			  if(j==1)res++;
			  
		  }
		  
		  System.out.println(res);
		  
	} Scanner cin=new Scanner(System.in); cin new Scanner(System.in) List<Integer> list=new ArrayList<>(); list new ArrayList<>() int n=cin.nextInt() n cin.nextInt() cin.nextInt cin res=0; res 0 for(int i=0;i<n;i++)list.add(cin.nextInt()); int i=0; int i=0; i 0 i<n i n i++ i++ i list.add(cin.nextInt()); list.add(cin.nextInt()) list.add list cin.nextInt() cin.nextInt cin for(int i=0;i<n;i++) {
			  int x=list.get(i),limit=(int)(Math.sqrt(x)),j;
			  
			  for(j=limit;j>1;j--) {
				  if(x%j==0)break;
			  }
			  
			  if(j==1)res++;
			  
		  } int i=0; int i=0; i 0 i<n i n i++ i++ i {
			  int x=list.get(i),limit=(int)(Math.sqrt(x)),j;
			  
			  for(j=limit;j>1;j--) {
				  if(x%j==0)break;
			  }
			  
			  if(j==1)res++;
			  
		  } {
			  int x=list.get(i),limit=(int)(Math.sqrt(x)),j;
			  
			  for(j=limit;j>1;j--) {
				  if(x%j==0)break;
			  }
			  
			  if(j==1)res++;
			  
		  } int x=list.get(i) x list.get(i) list.get list i limit=(int)(Math.sqrt(x)) limit (int)(Math.sqrt(x)) Math.sqrt Math x j; j for(j=limit;j>1;j--) {
				  if(x%j==0)break;
			  } j=limit; j=limit j limit j>1 j 1 j-- j-- j {
				  if(x%j==0)break;
			  } {
				  if(x%j==0)break;
			  } if(x%j==0)break; x%j==0 x%j x j 0 break; if(j==1)res++; j==1 j 1 res++ res System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main {

	public static void main(String[] args) {
		  Scanner cin=new Scanner(System.in);
		  List<Integer> list=new ArrayList<>();
		  int n=cin.nextInt(),res=0;
		  for(int i=0;i<n;i++)list.add(cin.nextInt());
		  
		  for(int i=0;i<n;i++) {
			  int x=list.get(i),limit=(int)(Math.sqrt(x)),j;
			  
			  for(j=limit;j>1;j--) {
				  if(x%j==0)break;
			  }
			  
			  if(j==1)res++;
			  
		  }
		  
		  System.out.println(res);
		  
	}

} public class Main {

	public static void main(String[] args) {
		  Scanner cin=new Scanner(System.in);
		  List<Integer> list=new ArrayList<>();
		  int n=cin.nextInt(),res=0;
		  for(int i=0;i<n;i++)list.add(cin.nextInt());
		  
		  for(int i=0;i<n;i++) {
			  int x=list.get(i),limit=(int)(Math.sqrt(x)),j;
			  
			  for(j=limit;j>1;j--) {
				  if(x%j==0)break;
			  }
			  
			  if(j==1)res++;
			  
		  }
		  
		  System.out.println(res);
		  
	}

} Main

import java.util.*;
public class Main {

	public static void main(String[] args) {
		  Scanner cin=new Scanner(System.in);
		  List<Integer> list=new ArrayList<>();
		  int n=cin.nextInt(),res=0;
		  for(int i=0;i<n;i++)list.add(cin.nextInt());
		  
		  for(int i=0;i<n;i++) {
			  int x=list.get(i),limit=(int)(Math.sqrt(x)),j;
			  
			  for(j=limit;j>1;j--) {
				  if(x%j==0)break;
			  }
			  
			  if(j==1)res++;
			  
		  }
		  
		  System.out.println(res);
		  
	}

}

