import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		int count = 0;
		for (int i=0; i<n; i++) {
			if(isPrime(stdIn.nextInt()))
				count++;
		}
		System.out.println(count);
	}

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

	static boolean isPrime(int x){
		for (int i=2; i<=Math.pow(x,0.5); i++) {
			if(x%i == 0)
				return false;
		}
		return x!=1;
	}
} Main public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		int count = 0;
		for (int i=0; i<n; i++) {
			if(isPrime(stdIn.nextInt()))
				count++;
		}
		System.out.println(count);
	} main {
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		int count = 0;
		for (int i=0; i<n; i++) {
			if(isPrime(stdIn.nextInt()))
				count++;
		}
		System.out.println(count);
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int n = stdIn.nextInt(); n stdIn.nextInt() stdIn.nextInt stdIn int count = 0; count 0 for (int i=0; i<n; i++) {
			if(isPrime(stdIn.nextInt()))
				count++;
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			if(isPrime(stdIn.nextInt()))
				count++;
		} {
			if(isPrime(stdIn.nextInt()))
				count++;
		} if(isPrime(stdIn.nextInt()))
				count++; isPrime(stdIn.nextInt()) isPrime stdIn.nextInt() stdIn.nextInt stdIn count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args static boolean isPrime(int x){
		for (int i=2; i<=Math.pow(x,0.5); i++) {
			if(x%i == 0)
				return false;
		}
		return x!=1;
	} isPrime {
		for (int i=2; i<=Math.pow(x,0.5); i++) {
			if(x%i == 0)
				return false;
		}
		return x!=1;
	} for (int i=2; i<=Math.pow(x,0.5); i++) {
			if(x%i == 0)
				return false;
		} int i=2; int i=2; i 2 i<=Math.pow(x,0.5) i Math.pow(x,0.5) Math.pow Math x 0.5 i++ i++ i {
			if(x%i == 0)
				return false;
		} {
			if(x%i == 0)
				return false;
		} if(x%i == 0)
				return false; x%i == 0 x%i x i 0 return false; false return x!=1; x!=1 x 1 int x x
import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		int count = 0;
		for (int i=0; i<n; i++) {
			if(isPrime(stdIn.nextInt()))
				count++;
		}
		System.out.println(count);
	}

	static boolean isPrime(int x){
		for (int i=2; i<=Math.pow(x,0.5); i++) {
			if(x%i == 0)
				return false;
		}
		return x!=1;
	}
}