import java.util.Scanner;

public class Main {
	
	static Scanner scan;
	
	public static boolean judgePN(int a) {
		if (a == 1) return false;
		
		int quotient = a;
		
		for(int i = 2; i < a; i++) {
			quotient = a / i;
			if(a % i == 0) return false;
			if(i > quotient) break;
		}
		
		return true;
	}
	
	public static void main(String[] args) {
		scan = new Scanner(System.in);
		
		// Get the number of the input list
		final int n = scan.nextInt();
		
		// Get figures of the input list
		int list[] = new int[n];
		for(int i = 0; i < n; i++) {
			list[i] = scan.nextInt();
		}
		
		// Count the number of prime number
		int count = 0;
		for(int i = 0; i < n; i++) {
			if(judgePN(list[i])) count++;
		}
		
		// Output
		System.out.println(count);
	}
}
 import java.util.Scanner; Scanner java.util public class Main {
	
	static Scanner scan;
	
	public static boolean judgePN(int a) {
		if (a == 1) return false;
		
		int quotient = a;
		
		for(int i = 2; i < a; i++) {
			quotient = a / i;
			if(a % i == 0) return false;
			if(i > quotient) break;
		}
		
		return true;
	}
	
	public static void main(String[] args) {
		scan = new Scanner(System.in);
		
		// Get the number of the input list
		final int n = scan.nextInt();
		
		// Get figures of the input list
		int list[] = new int[n];
		for(int i = 0; i < n; i++) {
			list[i] = scan.nextInt();
		}
		
		// Count the number of prime number
		int count = 0;
		for(int i = 0; i < n; i++) {
			if(judgePN(list[i])) count++;
		}
		
		// Output
		System.out.println(count);
	}
} Main static Scanner scan; scan public static boolean judgePN(int a) {
		if (a == 1) return false;
		
		int quotient = a;
		
		for(int i = 2; i < a; i++) {
			quotient = a / i;
			if(a % i == 0) return false;
			if(i > quotient) break;
		}
		
		return true;
	} judgePN {
		if (a == 1) return false;
		
		int quotient = a;
		
		for(int i = 2; i < a; i++) {
			quotient = a / i;
			if(a % i == 0) return false;
			if(i > quotient) break;
		}
		
		return true;
	} if (a == 1) return false; a == 1 a 1 return false; false int quotient = a; quotient a for(int i = 2; i < a; i++) {
			quotient = a / i;
			if(a % i == 0) return false;
			if(i > quotient) break;
		} int i = 2; int i = 2; i 2 i < a i a i++ i++ i {
			quotient = a / i;
			if(a % i == 0) return false;
			if(i > quotient) break;
		} {
			quotient = a / i;
			if(a % i == 0) return false;
			if(i > quotient) break;
		} quotient = a / i quotient a / i a i if(a % i == 0) return false; a % i == 0 a % i a i 0 return false; false if(i > quotient) break; i > quotient i quotient break; return true; true int a a public static void main(String[] args) {
		scan = new Scanner(System.in);
		
		// Get the number of the input list
		final int n = scan.nextInt();
		
		// Get figures of the input list
		int list[] = new int[n];
		for(int i = 0; i < n; i++) {
			list[i] = scan.nextInt();
		}
		
		// Count the number of prime number
		int count = 0;
		for(int i = 0; i < n; i++) {
			if(judgePN(list[i])) count++;
		}
		
		// Output
		System.out.println(count);
	} main {
		scan = new Scanner(System.in);
		
		// Get the number of the input list
		final int n = scan.nextInt();
		
		// Get figures of the input list
		int list[] = new int[n];
		for(int i = 0; i < n; i++) {
			list[i] = scan.nextInt();
		}
		
		// Count the number of prime number
		int count = 0;
		for(int i = 0; i < n; i++) {
			if(judgePN(list[i])) count++;
		}
		
		// Output
		System.out.println(count);
	} scan = new Scanner(System.in) scan new Scanner(System.in) final int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int list[] = new int[n]; list new int[n] n for(int i = 0; i < n; i++) {
			list[i] = scan.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			list[i] = scan.nextInt();
		} {
			list[i] = scan.nextInt();
		} list[i] = scan.nextInt() list[i] list i scan.nextInt() scan.nextInt scan int count = 0; count 0 for(int i = 0; i < n; i++) {
			if(judgePN(list[i])) count++;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			if(judgePN(list[i])) count++;
		} {
			if(judgePN(list[i])) count++;
		} if(judgePN(list[i])) count++; judgePN(list[i]) judgePN list[i] list i count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
	
	static Scanner scan;
	
	public static boolean judgePN(int a) {
		if (a == 1) return false;
		
		int quotient = a;
		
		for(int i = 2; i < a; i++) {
			quotient = a / i;
			if(a % i == 0) return false;
			if(i > quotient) break;
		}
		
		return true;
	}
	
	public static void main(String[] args) {
		scan = new Scanner(System.in);
		
		// Get the number of the input list
		final int n = scan.nextInt();
		
		// Get figures of the input list
		int list[] = new int[n];
		for(int i = 0; i < n; i++) {
			list[i] = scan.nextInt();
		}
		
		// Count the number of prime number
		int count = 0;
		for(int i = 0; i < n; i++) {
			if(judgePN(list[i])) count++;
		}
		
		// Output
		System.out.println(count);
	}
} public class Main {
	
	static Scanner scan;
	
	public static boolean judgePN(int a) {
		if (a == 1) return false;
		
		int quotient = a;
		
		for(int i = 2; i < a; i++) {
			quotient = a / i;
			if(a % i == 0) return false;
			if(i > quotient) break;
		}
		
		return true;
	}
	
	public static void main(String[] args) {
		scan = new Scanner(System.in);
		
		// Get the number of the input list
		final int n = scan.nextInt();
		
		// Get figures of the input list
		int list[] = new int[n];
		for(int i = 0; i < n; i++) {
			list[i] = scan.nextInt();
		}
		
		// Count the number of prime number
		int count = 0;
		for(int i = 0; i < n; i++) {
			if(judgePN(list[i])) count++;
		}
		
		// Output
		System.out.println(count);
	}
} Main
import java.util.Scanner;

public class Main {
	
	static Scanner scan;
	
	public static boolean judgePN(int a) {
		if (a == 1) return false;
		
		int quotient = a;
		
		for(int i = 2; i < a; i++) {
			quotient = a / i;
			if(a % i == 0) return false;
			if(i > quotient) break;
		}
		
		return true;
	}
	
	public static void main(String[] args) {
		scan = new Scanner(System.in);
		
		// Get the number of the input list
		final int n = scan.nextInt();
		
		// Get figures of the input list
		int list[] = new int[n];
		for(int i = 0; i < n; i++) {
			list[i] = scan.nextInt();
		}
		
		// Count the number of prime number
		int count = 0;
		for(int i = 0; i < n; i++) {
			if(judgePN(list[i])) count++;
		}
		
		// Output
		System.out.println(count);
	}
}

