import java.util.Scanner;
class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int count = 0;
		for(int i = 0; i < N; i++){
			count += (isPrime(scan.nextInt()) ? 1 : 0);
		}
		System.out.println(count);
	}
	public static boolean isPrime(int a){
		for(int i = 2; i * i <= a; i++){
			if(a % i == 0){
				return false;
			}
		}
		return true;
	}
} import java.util.Scanner; Scanner java.util class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int count = 0;
		for(int i = 0; i < N; i++){
			count += (isPrime(scan.nextInt()) ? 1 : 0);
		}
		System.out.println(count);
	}
	public static boolean isPrime(int a){
		for(int i = 2; i * i <= a; i++){
			if(a % i == 0){
				return false;
			}
		}
		return true;
	}
} Main public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int count = 0;
		for(int i = 0; i < N; i++){
			count += (isPrime(scan.nextInt()) ? 1 : 0);
		}
		System.out.println(count);
	} main {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int count = 0;
		for(int i = 0; i < N; i++){
			count += (isPrime(scan.nextInt()) ? 1 : 0);
		}
		System.out.println(count);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int count = 0; count 0 for(int i = 0; i < N; i++){
			count += (isPrime(scan.nextInt()) ? 1 : 0);
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			count += (isPrime(scan.nextInt()) ? 1 : 0);
		} {
			count += (isPrime(scan.nextInt()) ? 1 : 0);
		} count += (isPrime(scan.nextInt()) ? 1 : 0) count (isPrime(scan.nextInt()) ? 1 : 0) isPrime(scan.nextInt()) isPrime scan.nextInt() scan.nextInt scan 1 0 System.out.println(count) System.out.println System.out System System.out count String[] args args public static boolean isPrime(int a){
		for(int i = 2; i * i <= a; i++){
			if(a % i == 0){
				return false;
			}
		}
		return true;
	} isPrime {
		for(int i = 2; i * i <= a; i++){
			if(a % i == 0){
				return false;
			}
		}
		return true;
	} for(int i = 2; i * i <= a; i++){
			if(a % i == 0){
				return false;
			}
		} int i = 2; int i = 2; i 2 i * i <= a i * i i i a i++ i++ i {
			if(a % i == 0){
				return false;
			}
		} {
			if(a % i == 0){
				return false;
			}
		} if(a % i == 0){
				return false;
			} a % i == 0 a % i a i 0 {
				return false;
			} return false; false return true; true int a a
import java.util.Scanner;
class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int count = 0;
		for(int i = 0; i < N; i++){
			count += (isPrime(scan.nextInt()) ? 1 : 0);
		}
		System.out.println(count);
	}
	public static boolean isPrime(int a){
		for(int i = 2; i * i <= a; i++){
			if(a % i == 0){
				return false;
			}
		}
		return true;
	}
}