import java.util.*;
import java.math.*;
class Main {
	static boolean isPrime(int N)
	{
		for (int i = 2; i <= Math.sqrt(N); i++) 
		{
			if(N % i == 0){return false;}
	    }
		return N!=1;
    }
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int cnt = 0;
		for (int i=0; i<n; i++) {
			if(isPrime(sc.nextInt()))
				cnt++;
		}
		System.out.println(cnt);
	}
    


}


 import java.util.*; util.* java import java.math.*; math.* java class Main {
	static boolean isPrime(int N)
	{
		for (int i = 2; i <= Math.sqrt(N); i++) 
		{
			if(N % i == 0){return false;}
	    }
		return N!=1;
    }
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int cnt = 0;
		for (int i=0; i<n; i++) {
			if(isPrime(sc.nextInt()))
				cnt++;
		}
		System.out.println(cnt);
	}
    


} Main static boolean isPrime(int N)
	{
		for (int i = 2; i <= Math.sqrt(N); i++) 
		{
			if(N % i == 0){return false;}
	    }
		return N!=1;
    } isPrime {
		for (int i = 2; i <= Math.sqrt(N); i++) 
		{
			if(N % i == 0){return false;}
	    }
		return N!=1;
    } for (int i = 2; i <= Math.sqrt(N); i++) 
		{
			if(N % i == 0){return false;}
	    } int i = 2; int i = 2; i 2 i <= Math.sqrt(N) i Math.sqrt(N) Math.sqrt Math N i++ i++ i {
			if(N % i == 0){return false;}
	    } {
			if(N % i == 0){return false;}
	    } if(N % i == 0){return false;} N % i == 0 N % i N i 0 {return false;} return false; false return N!=1; N!=1 N 1 int N N public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int cnt = 0;
		for (int i=0; i<n; i++) {
			if(isPrime(sc.nextInt()))
				cnt++;
		}
		System.out.println(cnt);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int cnt = 0;
		for (int i=0; i<n; i++) {
			if(isPrime(sc.nextInt()))
				cnt++;
		}
		System.out.println(cnt);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int cnt = 0; cnt 0 for (int i=0; i<n; i++) {
			if(isPrime(sc.nextInt()))
				cnt++;
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			if(isPrime(sc.nextInt()))
				cnt++;
		} {
			if(isPrime(sc.nextInt()))
				cnt++;
		} if(isPrime(sc.nextInt()))
				cnt++; isPrime(sc.nextInt()) isPrime sc.nextInt() sc.nextInt sc cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args
import java.util.*;
import java.math.*;
class Main {
	static boolean isPrime(int N)
	{
		for (int i = 2; i <= Math.sqrt(N); i++) 
		{
			if(N % i == 0){return false;}
	    }
		return N!=1;
    }
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int cnt = 0;
		for (int i=0; i<n; i++) {
			if(isPrime(sc.nextInt()))
				cnt++;
		}
		System.out.println(cnt);
	}
    


}



