import java.util.Scanner;
import java.util.ArrayList;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int length = sc.nextInt();
		int count = 0;
		ArrayList<Integer> primeAr = new ArrayList<Integer>();
		
		for (int i = 0; i < length; i++) {
			int num = sc.nextInt();
			if (!primeAr.contains(num) && isPrime(num)) {
				count++;
				primeAr.add(num);
			}
		}
		System.out.println(count);
	}
	
	public static boolean isPrime(int i) {
		
		boolean prime = true;
		for (int j = 2; j <= Math.pow(i, 0.5); j++) {
			if (i % j == 0) {
				prime = false;
				break;
			}
		}
		return prime;
	}
} import java.util.Scanner; Scanner java.util import java.util.ArrayList; ArrayList java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int length = sc.nextInt();
		int count = 0;
		ArrayList<Integer> primeAr = new ArrayList<Integer>();
		
		for (int i = 0; i < length; i++) {
			int num = sc.nextInt();
			if (!primeAr.contains(num) && isPrime(num)) {
				count++;
				primeAr.add(num);
			}
		}
		System.out.println(count);
	}
	
	public static boolean isPrime(int i) {
		
		boolean prime = true;
		for (int j = 2; j <= Math.pow(i, 0.5); j++) {
			if (i % j == 0) {
				prime = false;
				break;
			}
		}
		return prime;
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int length = sc.nextInt();
		int count = 0;
		ArrayList<Integer> primeAr = new ArrayList<Integer>();
		
		for (int i = 0; i < length; i++) {
			int num = sc.nextInt();
			if (!primeAr.contains(num) && isPrime(num)) {
				count++;
				primeAr.add(num);
			}
		}
		System.out.println(count);
	} main {
		Scanner sc = new Scanner(System.in);
		int length = sc.nextInt();
		int count = 0;
		ArrayList<Integer> primeAr = new ArrayList<Integer>();
		
		for (int i = 0; i < length; i++) {
			int num = sc.nextInt();
			if (!primeAr.contains(num) && isPrime(num)) {
				count++;
				primeAr.add(num);
			}
		}
		System.out.println(count);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int length = sc.nextInt(); length sc.nextInt() sc.nextInt sc int count = 0; count 0 ArrayList<Integer> primeAr = new ArrayList<Integer>(); primeAr new ArrayList<Integer>() for (int i = 0; i < length; i++) {
			int num = sc.nextInt();
			if (!primeAr.contains(num) && isPrime(num)) {
				count++;
				primeAr.add(num);
			}
		} int i = 0; int i = 0; i 0 i < length i length i++ i++ i {
			int num = sc.nextInt();
			if (!primeAr.contains(num) && isPrime(num)) {
				count++;
				primeAr.add(num);
			}
		} {
			int num = sc.nextInt();
			if (!primeAr.contains(num) && isPrime(num)) {
				count++;
				primeAr.add(num);
			}
		} int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc if (!primeAr.contains(num) && isPrime(num)) {
				count++;
				primeAr.add(num);
			} !primeAr.contains(num) && isPrime(num) !primeAr.contains(num) primeAr.contains(num) primeAr.contains primeAr num isPrime(num) isPrime num {
				count++;
				primeAr.add(num);
			} count++ count primeAr.add(num) primeAr.add primeAr num System.out.println(count) System.out.println System.out System System.out count String[] args args public static boolean isPrime(int i) {
		
		boolean prime = true;
		for (int j = 2; j <= Math.pow(i, 0.5); j++) {
			if (i % j == 0) {
				prime = false;
				break;
			}
		}
		return prime;
	} isPrime {
		
		boolean prime = true;
		for (int j = 2; j <= Math.pow(i, 0.5); j++) {
			if (i % j == 0) {
				prime = false;
				break;
			}
		}
		return prime;
	} boolean prime = true; prime true for (int j = 2; j <= Math.pow(i, 0.5); j++) {
			if (i % j == 0) {
				prime = false;
				break;
			}
		} int j = 2; int j = 2; j 2 j <= Math.pow(i, 0.5) j Math.pow(i, 0.5) Math.pow Math i 0.5 j++ j++ j {
			if (i % j == 0) {
				prime = false;
				break;
			}
		} {
			if (i % j == 0) {
				prime = false;
				break;
			}
		} if (i % j == 0) {
				prime = false;
				break;
			} i % j == 0 i % j i j 0 {
				prime = false;
				break;
			} prime = false prime false break; return prime; prime int i i public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int length = sc.nextInt();
		int count = 0;
		ArrayList<Integer> primeAr = new ArrayList<Integer>();
		
		for (int i = 0; i < length; i++) {
			int num = sc.nextInt();
			if (!primeAr.contains(num) && isPrime(num)) {
				count++;
				primeAr.add(num);
			}
		}
		System.out.println(count);
	}
	
	public static boolean isPrime(int i) {
		
		boolean prime = true;
		for (int j = 2; j <= Math.pow(i, 0.5); j++) {
			if (i % j == 0) {
				prime = false;
				break;
			}
		}
		return prime;
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int length = sc.nextInt();
		int count = 0;
		ArrayList<Integer> primeAr = new ArrayList<Integer>();
		
		for (int i = 0; i < length; i++) {
			int num = sc.nextInt();
			if (!primeAr.contains(num) && isPrime(num)) {
				count++;
				primeAr.add(num);
			}
		}
		System.out.println(count);
	}
	
	public static boolean isPrime(int i) {
		
		boolean prime = true;
		for (int j = 2; j <= Math.pow(i, 0.5); j++) {
			if (i % j == 0) {
				prime = false;
				break;
			}
		}
		return prime;
	}
} Main
import java.util.Scanner;
import java.util.ArrayList;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int length = sc.nextInt();
		int count = 0;
		ArrayList<Integer> primeAr = new ArrayList<Integer>();
		
		for (int i = 0; i < length; i++) {
			int num = sc.nextInt();
			if (!primeAr.contains(num) && isPrime(num)) {
				count++;
				primeAr.add(num);
			}
		}
		System.out.println(count);
	}
	
	public static boolean isPrime(int i) {
		
		boolean prime = true;
		for (int j = 2; j <= Math.pow(i, 0.5); j++) {
			if (i % j == 0) {
				prime = false;
				break;
			}
		}
		return prime;
	}
}