import java.util.Scanner;

public class Main {
	
	public static int Pm(int[] A) {
		
		int count = 0;
		
		for(int i=0;i<A.length;i++) {
			boolean NumberF = true;
			for(int j=2;j<= Math.sqrt(A[i]);j++) {
				
				if(A[i] < 2) {
					NumberF = false;
					break;
				}else if(A[i] == 2) {
					break;
				}else if(A[i] % 2 == 0) {
					NumberF = false;
					break;
				}
				
				if(A[i] % j == 0) {
					NumberF = false;
					break;
				}
				
			}
			
			if(NumberF) count++;
		}
		
		return count;
		
	}
	
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	
    	int n = sc.nextInt();
    	
    	int[] box = new int[n];
    	
    	for(int i=0;i<n;i++) {
    		box[i] = sc.nextInt();
    	}
    	
    	System.out.println(Pm(box));
    	
    }
} import java.util.Scanner; Scanner java.util public class Main {
	
	public static int Pm(int[] A) {
		
		int count = 0;
		
		for(int i=0;i<A.length;i++) {
			boolean NumberF = true;
			for(int j=2;j<= Math.sqrt(A[i]);j++) {
				
				if(A[i] < 2) {
					NumberF = false;
					break;
				}else if(A[i] == 2) {
					break;
				}else if(A[i] % 2 == 0) {
					NumberF = false;
					break;
				}
				
				if(A[i] % j == 0) {
					NumberF = false;
					break;
				}
				
			}
			
			if(NumberF) count++;
		}
		
		return count;
		
	}
	
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	
    	int n = sc.nextInt();
    	
    	int[] box = new int[n];
    	
    	for(int i=0;i<n;i++) {
    		box[i] = sc.nextInt();
    	}
    	
    	System.out.println(Pm(box));
    	
    }
} Main public static int Pm(int[] A) {
		
		int count = 0;
		
		for(int i=0;i<A.length;i++) {
			boolean NumberF = true;
			for(int j=2;j<= Math.sqrt(A[i]);j++) {
				
				if(A[i] < 2) {
					NumberF = false;
					break;
				}else if(A[i] == 2) {
					break;
				}else if(A[i] % 2 == 0) {
					NumberF = false;
					break;
				}
				
				if(A[i] % j == 0) {
					NumberF = false;
					break;
				}
				
			}
			
			if(NumberF) count++;
		}
		
		return count;
		
	} Pm {
		
		int count = 0;
		
		for(int i=0;i<A.length;i++) {
			boolean NumberF = true;
			for(int j=2;j<= Math.sqrt(A[i]);j++) {
				
				if(A[i] < 2) {
					NumberF = false;
					break;
				}else if(A[i] == 2) {
					break;
				}else if(A[i] % 2 == 0) {
					NumberF = false;
					break;
				}
				
				if(A[i] % j == 0) {
					NumberF = false;
					break;
				}
				
			}
			
			if(NumberF) count++;
		}
		
		return count;
		
	} int count = 0; count 0 for(int i=0;i<A.length;i++) {
			boolean NumberF = true;
			for(int j=2;j<= Math.sqrt(A[i]);j++) {
				
				if(A[i] < 2) {
					NumberF = false;
					break;
				}else if(A[i] == 2) {
					break;
				}else if(A[i] % 2 == 0) {
					NumberF = false;
					break;
				}
				
				if(A[i] % j == 0) {
					NumberF = false;
					break;
				}
				
			}
			
			if(NumberF) count++;
		} int i=0; int i=0; i 0 i<A.length i A.length A A.length i++ i++ i {
			boolean NumberF = true;
			for(int j=2;j<= Math.sqrt(A[i]);j++) {
				
				if(A[i] < 2) {
					NumberF = false;
					break;
				}else if(A[i] == 2) {
					break;
				}else if(A[i] % 2 == 0) {
					NumberF = false;
					break;
				}
				
				if(A[i] % j == 0) {
					NumberF = false;
					break;
				}
				
			}
			
			if(NumberF) count++;
		} {
			boolean NumberF = true;
			for(int j=2;j<= Math.sqrt(A[i]);j++) {
				
				if(A[i] < 2) {
					NumberF = false;
					break;
				}else if(A[i] == 2) {
					break;
				}else if(A[i] % 2 == 0) {
					NumberF = false;
					break;
				}
				
				if(A[i] % j == 0) {
					NumberF = false;
					break;
				}
				
			}
			
			if(NumberF) count++;
		} boolean NumberF = true; NumberF true for(int j=2;j<= Math.sqrt(A[i]);j++) {
				
				if(A[i] < 2) {
					NumberF = false;
					break;
				}else if(A[i] == 2) {
					break;
				}else if(A[i] % 2 == 0) {
					NumberF = false;
					break;
				}
				
				if(A[i] % j == 0) {
					NumberF = false;
					break;
				}
				
			} int j=2; int j=2; j 2 j<= Math.sqrt(A[i]) j Math.sqrt(A[i]) Math.sqrt Math A[i] A i j++ j++ j {
				
				if(A[i] < 2) {
					NumberF = false;
					break;
				}else if(A[i] == 2) {
					break;
				}else if(A[i] % 2 == 0) {
					NumberF = false;
					break;
				}
				
				if(A[i] % j == 0) {
					NumberF = false;
					break;
				}
				
			} {
				
				if(A[i] < 2) {
					NumberF = false;
					break;
				}else if(A[i] == 2) {
					break;
				}else if(A[i] % 2 == 0) {
					NumberF = false;
					break;
				}
				
				if(A[i] % j == 0) {
					NumberF = false;
					break;
				}
				
			} if(A[i] < 2) {
					NumberF = false;
					break;
				}else if(A[i] == 2) {
					break;
				}else if(A[i] % 2 == 0) {
					NumberF = false;
					break;
				} A[i] < 2 A[i] A i 2 {
					NumberF = false;
					break;
				} NumberF = false NumberF false break; if(A[i] == 2) {
					break;
				}else if(A[i] % 2 == 0) {
					NumberF = false;
					break;
				} A[i] == 2 A[i] A i 2 {
					break;
				} break; if(A[i] % 2 == 0) {
					NumberF = false;
					break;
				} A[i] % 2 == 0 A[i] % 2 A[i] A i 2 0 {
					NumberF = false;
					break;
				} NumberF = false NumberF false break; if(A[i] % j == 0) {
					NumberF = false;
					break;
				} A[i] % j == 0 A[i] % j A[i] A i j 0 {
					NumberF = false;
					break;
				} NumberF = false NumberF false break; if(NumberF) count++; NumberF count++ count return count; count int[] A A public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	
    	int n = sc.nextInt();
    	
    	int[] box = new int[n];
    	
    	for(int i=0;i<n;i++) {
    		box[i] = sc.nextInt();
    	}
    	
    	System.out.println(Pm(box));
    	
    } main {
    	Scanner sc = new Scanner(System.in);
    	
    	int n = sc.nextInt();
    	
    	int[] box = new int[n];
    	
    	for(int i=0;i<n;i++) {
    		box[i] = sc.nextInt();
    	}
    	
    	System.out.println(Pm(box));
    	
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] box = new int[n]; box new int[n] n for(int i=0;i<n;i++) {
    		box[i] = sc.nextInt();
    	} int i=0; int i=0; i 0 i<n i n i++ i++ i {
    		box[i] = sc.nextInt();
    	} {
    		box[i] = sc.nextInt();
    	} box[i] = sc.nextInt() box[i] box i sc.nextInt() sc.nextInt sc System.out.println(Pm(box)) System.out.println System.out System System.out Pm(box) Pm box String[] args args public class Main {
	
	public static int Pm(int[] A) {
		
		int count = 0;
		
		for(int i=0;i<A.length;i++) {
			boolean NumberF = true;
			for(int j=2;j<= Math.sqrt(A[i]);j++) {
				
				if(A[i] < 2) {
					NumberF = false;
					break;
				}else if(A[i] == 2) {
					break;
				}else if(A[i] % 2 == 0) {
					NumberF = false;
					break;
				}
				
				if(A[i] % j == 0) {
					NumberF = false;
					break;
				}
				
			}
			
			if(NumberF) count++;
		}
		
		return count;
		
	}
	
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	
    	int n = sc.nextInt();
    	
    	int[] box = new int[n];
    	
    	for(int i=0;i<n;i++) {
    		box[i] = sc.nextInt();
    	}
    	
    	System.out.println(Pm(box));
    	
    }
} public class Main {
	
	public static int Pm(int[] A) {
		
		int count = 0;
		
		for(int i=0;i<A.length;i++) {
			boolean NumberF = true;
			for(int j=2;j<= Math.sqrt(A[i]);j++) {
				
				if(A[i] < 2) {
					NumberF = false;
					break;
				}else if(A[i] == 2) {
					break;
				}else if(A[i] % 2 == 0) {
					NumberF = false;
					break;
				}
				
				if(A[i] % j == 0) {
					NumberF = false;
					break;
				}
				
			}
			
			if(NumberF) count++;
		}
		
		return count;
		
	}
	
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	
    	int n = sc.nextInt();
    	
    	int[] box = new int[n];
    	
    	for(int i=0;i<n;i++) {
    		box[i] = sc.nextInt();
    	}
    	
    	System.out.println(Pm(box));
    	
    }
} Main
import java.util.Scanner;

public class Main {
	
	public static int Pm(int[] A) {
		
		int count = 0;
		
		for(int i=0;i<A.length;i++) {
			boolean NumberF = true;
			for(int j=2;j<= Math.sqrt(A[i]);j++) {
				
				if(A[i] < 2) {
					NumberF = false;
					break;
				}else if(A[i] == 2) {
					break;
				}else if(A[i] % 2 == 0) {
					NumberF = false;
					break;
				}
				
				if(A[i] % j == 0) {
					NumberF = false;
					break;
				}
				
			}
			
			if(NumberF) count++;
		}
		
		return count;
		
	}
	
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	
    	int n = sc.nextInt();
    	
    	int[] box = new int[n];
    	
    	for(int i=0;i<n;i++) {
    		box[i] = sc.nextInt();
    	}
    	
    	System.out.println(Pm(box));
    	
    }
}
