import java.util.Scanner;

public class Main{
	
	public static void main(String[] args) {
		
		int[] list;
		int length;
		int primes = 0;
		
		Scanner keyboard = new Scanner(System.in);
		
		length = keyboard.nextInt();
		
		list = new int[length];
		
		for(int i = 0; i < length; i++) {
			list[i] = keyboard.nextInt();
		}
		
		for(int i = 0; i < length; i++) {
			if(isPrime(list[i])) primes++;
		}
		
		System.out.println(primes);
		
	}
	
	public static boolean isPrime(int a) {
		
	    if(a == 2 || a == 3 || a == 5 || a == 7) {
		    return true;
		    }
	    if(a % 2 == 0) {
		    return false;
		    }
	    for(int j=3;j <= Math.sqrt(a);j++){
	        if(a % j == 0){ 
	            return false;}
	    }
	    return true;
	    }
		
}
 import java.util.Scanner; Scanner java.util public class Main{
	
	public static void main(String[] args) {
		
		int[] list;
		int length;
		int primes = 0;
		
		Scanner keyboard = new Scanner(System.in);
		
		length = keyboard.nextInt();
		
		list = new int[length];
		
		for(int i = 0; i < length; i++) {
			list[i] = keyboard.nextInt();
		}
		
		for(int i = 0; i < length; i++) {
			if(isPrime(list[i])) primes++;
		}
		
		System.out.println(primes);
		
	}
	
	public static boolean isPrime(int a) {
		
	    if(a == 2 || a == 3 || a == 5 || a == 7) {
		    return true;
		    }
	    if(a % 2 == 0) {
		    return false;
		    }
	    for(int j=3;j <= Math.sqrt(a);j++){
	        if(a % j == 0){ 
	            return false;}
	    }
	    return true;
	    }
		
} Main public static void main(String[] args) {
		
		int[] list;
		int length;
		int primes = 0;
		
		Scanner keyboard = new Scanner(System.in);
		
		length = keyboard.nextInt();
		
		list = new int[length];
		
		for(int i = 0; i < length; i++) {
			list[i] = keyboard.nextInt();
		}
		
		for(int i = 0; i < length; i++) {
			if(isPrime(list[i])) primes++;
		}
		
		System.out.println(primes);
		
	} main {
		
		int[] list;
		int length;
		int primes = 0;
		
		Scanner keyboard = new Scanner(System.in);
		
		length = keyboard.nextInt();
		
		list = new int[length];
		
		for(int i = 0; i < length; i++) {
			list[i] = keyboard.nextInt();
		}
		
		for(int i = 0; i < length; i++) {
			if(isPrime(list[i])) primes++;
		}
		
		System.out.println(primes);
		
	} int[] list; list int length; length int primes = 0; primes 0 Scanner keyboard = new Scanner(System.in); keyboard new Scanner(System.in) length = keyboard.nextInt() length keyboard.nextInt() keyboard.nextInt keyboard list = new int[length] list new int[length] length for(int i = 0; i < length; i++) {
			list[i] = keyboard.nextInt();
		} int i = 0; int i = 0; i 0 i < length i length i++ i++ i {
			list[i] = keyboard.nextInt();
		} {
			list[i] = keyboard.nextInt();
		} list[i] = keyboard.nextInt() list[i] list i keyboard.nextInt() keyboard.nextInt keyboard for(int i = 0; i < length; i++) {
			if(isPrime(list[i])) primes++;
		} int i = 0; int i = 0; i 0 i < length i length i++ i++ i {
			if(isPrime(list[i])) primes++;
		} {
			if(isPrime(list[i])) primes++;
		} if(isPrime(list[i])) primes++; isPrime(list[i]) isPrime list[i] list i primes++ primes System.out.println(primes) System.out.println System.out System System.out primes String[] args args public static boolean isPrime(int a) {
		
	    if(a == 2 || a == 3 || a == 5 || a == 7) {
		    return true;
		    }
	    if(a % 2 == 0) {
		    return false;
		    }
	    for(int j=3;j <= Math.sqrt(a);j++){
	        if(a % j == 0){ 
	            return false;}
	    }
	    return true;
	    } isPrime {
		
	    if(a == 2 || a == 3 || a == 5 || a == 7) {
		    return true;
		    }
	    if(a % 2 == 0) {
		    return false;
		    }
	    for(int j=3;j <= Math.sqrt(a);j++){
	        if(a % j == 0){ 
	            return false;}
	    }
	    return true;
	    } if(a == 2 || a == 3 || a == 5 || a == 7) {
		    return true;
		    } a == 2 || a == 3 || a == 5 || a == 7 a == 5 a == 2 || a == 3 || a == 5 || a == 7 a == 2 a 2 a == 3 a 3 a == 5 a 5 a == 7 a 7 {
		    return true;
		    } return true; true if(a % 2 == 0) {
		    return false;
		    } a % 2 == 0 a % 2 a 2 0 {
		    return false;
		    } return false; false for(int j=3;j <= Math.sqrt(a);j++){
	        if(a % j == 0){ 
	            return false;}
	    } int j=3; int j=3; j 3 j <= Math.sqrt(a) j Math.sqrt(a) Math.sqrt Math a j++ j++ j {
	        if(a % j == 0){ 
	            return false;}
	    } {
	        if(a % j == 0){ 
	            return false;}
	    } if(a % j == 0){ 
	            return false;} a % j == 0 a % j a j 0 { 
	            return false;} return false; false return true; true int a a public class Main{
	
	public static void main(String[] args) {
		
		int[] list;
		int length;
		int primes = 0;
		
		Scanner keyboard = new Scanner(System.in);
		
		length = keyboard.nextInt();
		
		list = new int[length];
		
		for(int i = 0; i < length; i++) {
			list[i] = keyboard.nextInt();
		}
		
		for(int i = 0; i < length; i++) {
			if(isPrime(list[i])) primes++;
		}
		
		System.out.println(primes);
		
	}
	
	public static boolean isPrime(int a) {
		
	    if(a == 2 || a == 3 || a == 5 || a == 7) {
		    return true;
		    }
	    if(a % 2 == 0) {
		    return false;
		    }
	    for(int j=3;j <= Math.sqrt(a);j++){
	        if(a % j == 0){ 
	            return false;}
	    }
	    return true;
	    }
		
} public class Main{
	
	public static void main(String[] args) {
		
		int[] list;
		int length;
		int primes = 0;
		
		Scanner keyboard = new Scanner(System.in);
		
		length = keyboard.nextInt();
		
		list = new int[length];
		
		for(int i = 0; i < length; i++) {
			list[i] = keyboard.nextInt();
		}
		
		for(int i = 0; i < length; i++) {
			if(isPrime(list[i])) primes++;
		}
		
		System.out.println(primes);
		
	}
	
	public static boolean isPrime(int a) {
		
	    if(a == 2 || a == 3 || a == 5 || a == 7) {
		    return true;
		    }
	    if(a % 2 == 0) {
		    return false;
		    }
	    for(int j=3;j <= Math.sqrt(a);j++){
	        if(a % j == 0){ 
	            return false;}
	    }
	    return true;
	    }
		
} Main
import java.util.Scanner;

public class Main{
	
	public static void main(String[] args) {
		
		int[] list;
		int length;
		int primes = 0;
		
		Scanner keyboard = new Scanner(System.in);
		
		length = keyboard.nextInt();
		
		list = new int[length];
		
		for(int i = 0; i < length; i++) {
			list[i] = keyboard.nextInt();
		}
		
		for(int i = 0; i < length; i++) {
			if(isPrime(list[i])) primes++;
		}
		
		System.out.println(primes);
		
	}
	
	public static boolean isPrime(int a) {
		
	    if(a == 2 || a == 3 || a == 5 || a == 7) {
		    return true;
		    }
	    if(a % 2 == 0) {
		    return false;
		    }
	    for(int j=3;j <= Math.sqrt(a);j++){
	        if(a % j == 0){ 
	            return false;}
	    }
	    return true;
	    }
		
}

