import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int count=0;
		int n = Integer.parseInt(sc.nextLine());

		for(int i=0;i<n;i++){
			String s=sc.nextLine();
			int num=Integer.parseInt(s);
			double numDouble=Double.parseDouble(s);
			int divor=Math.round(Math.round(Math.sqrt(numDouble)))+1;
			boolean f=true;
			for(int j=2;j<divor;j++){
				if(num%j==0){
					f=false;
					break;
				}
			}
			if(f){
				count++;
			}
		}
		System.out.println(count);
	}
}
 import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int count=0;
		int n = Integer.parseInt(sc.nextLine());

		for(int i=0;i<n;i++){
			String s=sc.nextLine();
			int num=Integer.parseInt(s);
			double numDouble=Double.parseDouble(s);
			int divor=Math.round(Math.round(Math.sqrt(numDouble)))+1;
			boolean f=true;
			for(int j=2;j<divor;j++){
				if(num%j==0){
					f=false;
					break;
				}
			}
			if(f){
				count++;
			}
		}
		System.out.println(count);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int count=0;
		int n = Integer.parseInt(sc.nextLine());

		for(int i=0;i<n;i++){
			String s=sc.nextLine();
			int num=Integer.parseInt(s);
			double numDouble=Double.parseDouble(s);
			int divor=Math.round(Math.round(Math.sqrt(numDouble)))+1;
			boolean f=true;
			for(int j=2;j<divor;j++){
				if(num%j==0){
					f=false;
					break;
				}
			}
			if(f){
				count++;
			}
		}
		System.out.println(count);
	} main {
		Scanner sc = new Scanner(System.in);
		int count=0;
		int n = Integer.parseInt(sc.nextLine());

		for(int i=0;i<n;i++){
			String s=sc.nextLine();
			int num=Integer.parseInt(s);
			double numDouble=Double.parseDouble(s);
			int divor=Math.round(Math.round(Math.sqrt(numDouble)))+1;
			boolean f=true;
			for(int j=2;j<divor;j++){
				if(num%j==0){
					f=false;
					break;
				}
			}
			if(f){
				count++;
			}
		}
		System.out.println(count);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int count=0; count 0 int n = Integer.parseInt(sc.nextLine()); n Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc for(int i=0;i<n;i++){
			String s=sc.nextLine();
			int num=Integer.parseInt(s);
			double numDouble=Double.parseDouble(s);
			int divor=Math.round(Math.round(Math.sqrt(numDouble)))+1;
			boolean f=true;
			for(int j=2;j<divor;j++){
				if(num%j==0){
					f=false;
					break;
				}
			}
			if(f){
				count++;
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			String s=sc.nextLine();
			int num=Integer.parseInt(s);
			double numDouble=Double.parseDouble(s);
			int divor=Math.round(Math.round(Math.sqrt(numDouble)))+1;
			boolean f=true;
			for(int j=2;j<divor;j++){
				if(num%j==0){
					f=false;
					break;
				}
			}
			if(f){
				count++;
			}
		} {
			String s=sc.nextLine();
			int num=Integer.parseInt(s);
			double numDouble=Double.parseDouble(s);
			int divor=Math.round(Math.round(Math.sqrt(numDouble)))+1;
			boolean f=true;
			for(int j=2;j<divor;j++){
				if(num%j==0){
					f=false;
					break;
				}
			}
			if(f){
				count++;
			}
		} String s=sc.nextLine(); s sc.nextLine() sc.nextLine sc int num=Integer.parseInt(s); num Integer.parseInt(s) Integer.parseInt Integer s double numDouble=Double.parseDouble(s); numDouble Double.parseDouble(s) Double.parseDouble Double s int divor=Math.round(Math.round(Math.sqrt(numDouble)))+1; divor Math.round(Math.round(Math.sqrt(numDouble)))+1 Math.round(Math.round(Math.sqrt(numDouble))) Math.round Math Math.round(Math.sqrt(numDouble)) Math.round Math Math.sqrt(numDouble) Math.sqrt Math numDouble 1 boolean f=true; f true for(int j=2;j<divor;j++){
				if(num%j==0){
					f=false;
					break;
				}
			} int j=2; int j=2; j 2 j<divor j divor j++ j++ j {
				if(num%j==0){
					f=false;
					break;
				}
			} {
				if(num%j==0){
					f=false;
					break;
				}
			} if(num%j==0){
					f=false;
					break;
				} num%j==0 num%j num j 0 {
					f=false;
					break;
				} f=false f false break; if(f){
				count++;
			} f {
				count++;
			} count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int count=0;
		int n = Integer.parseInt(sc.nextLine());

		for(int i=0;i<n;i++){
			String s=sc.nextLine();
			int num=Integer.parseInt(s);
			double numDouble=Double.parseDouble(s);
			int divor=Math.round(Math.round(Math.sqrt(numDouble)))+1;
			boolean f=true;
			for(int j=2;j<divor;j++){
				if(num%j==0){
					f=false;
					break;
				}
			}
			if(f){
				count++;
			}
		}
		System.out.println(count);
	}
} public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int count=0;
		int n = Integer.parseInt(sc.nextLine());

		for(int i=0;i<n;i++){
			String s=sc.nextLine();
			int num=Integer.parseInt(s);
			double numDouble=Double.parseDouble(s);
			int divor=Math.round(Math.round(Math.sqrt(numDouble)))+1;
			boolean f=true;
			for(int j=2;j<divor;j++){
				if(num%j==0){
					f=false;
					break;
				}
			}
			if(f){
				count++;
			}
		}
		System.out.println(count);
	}
} Main
import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int count=0;
		int n = Integer.parseInt(sc.nextLine());

		for(int i=0;i<n;i++){
			String s=sc.nextLine();
			int num=Integer.parseInt(s);
			double numDouble=Double.parseDouble(s);
			int divor=Math.round(Math.round(Math.sqrt(numDouble)))+1;
			boolean f=true;
			for(int j=2;j<divor;j++){
				if(num%j==0){
					f=false;
					break;
				}
			}
			if(f){
				count++;
			}
		}
		System.out.println(count);
	}
}

