import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader (new InputStreamReader(System.in));

		int countResult = 0;

		int inputNumTimes = Integer.parseInt(br.readLine());

		for(int i = 0; i < inputNumTimes; i++) {
			int num = Integer.parseInt(br.readLine());
			boolean isPrimeNumber = true;

			for(int j = 2; j <= Math.sqrt(num); j++) {
				if(num % j == 0) {
					isPrimeNumber = false;
					break;
				}
			}
			if(isPrimeNumber) {
				countResult++;
			}
		}
		System.out.println(countResult);
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader (new InputStreamReader(System.in));

		int countResult = 0;

		int inputNumTimes = Integer.parseInt(br.readLine());

		for(int i = 0; i < inputNumTimes; i++) {
			int num = Integer.parseInt(br.readLine());
			boolean isPrimeNumber = true;

			for(int j = 2; j <= Math.sqrt(num); j++) {
				if(num % j == 0) {
					isPrimeNumber = false;
					break;
				}
			}
			if(isPrimeNumber) {
				countResult++;
			}
		}
		System.out.println(countResult);
	}
} Main public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader (new InputStreamReader(System.in));

		int countResult = 0;

		int inputNumTimes = Integer.parseInt(br.readLine());

		for(int i = 0; i < inputNumTimes; i++) {
			int num = Integer.parseInt(br.readLine());
			boolean isPrimeNumber = true;

			for(int j = 2; j <= Math.sqrt(num); j++) {
				if(num % j == 0) {
					isPrimeNumber = false;
					break;
				}
			}
			if(isPrimeNumber) {
				countResult++;
			}
		}
		System.out.println(countResult);
	} main {
		BufferedReader br = new BufferedReader (new InputStreamReader(System.in));

		int countResult = 0;

		int inputNumTimes = Integer.parseInt(br.readLine());

		for(int i = 0; i < inputNumTimes; i++) {
			int num = Integer.parseInt(br.readLine());
			boolean isPrimeNumber = true;

			for(int j = 2; j <= Math.sqrt(num); j++) {
				if(num % j == 0) {
					isPrimeNumber = false;
					break;
				}
			}
			if(isPrimeNumber) {
				countResult++;
			}
		}
		System.out.println(countResult);
	} BufferedReader br = new BufferedReader (new InputStreamReader(System.in)); br new BufferedReader (new InputStreamReader(System.in)) int countResult = 0; countResult 0 int inputNumTimes = Integer.parseInt(br.readLine()); inputNumTimes Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int i = 0; i < inputNumTimes; i++) {
			int num = Integer.parseInt(br.readLine());
			boolean isPrimeNumber = true;

			for(int j = 2; j <= Math.sqrt(num); j++) {
				if(num % j == 0) {
					isPrimeNumber = false;
					break;
				}
			}
			if(isPrimeNumber) {
				countResult++;
			}
		} int i = 0; int i = 0; i 0 i < inputNumTimes i inputNumTimes i++ i++ i {
			int num = Integer.parseInt(br.readLine());
			boolean isPrimeNumber = true;

			for(int j = 2; j <= Math.sqrt(num); j++) {
				if(num % j == 0) {
					isPrimeNumber = false;
					break;
				}
			}
			if(isPrimeNumber) {
				countResult++;
			}
		} {
			int num = Integer.parseInt(br.readLine());
			boolean isPrimeNumber = true;

			for(int j = 2; j <= Math.sqrt(num); j++) {
				if(num % j == 0) {
					isPrimeNumber = false;
					break;
				}
			}
			if(isPrimeNumber) {
				countResult++;
			}
		} int num = Integer.parseInt(br.readLine()); num Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br boolean isPrimeNumber = true; isPrimeNumber true for(int j = 2; j <= Math.sqrt(num); j++) {
				if(num % j == 0) {
					isPrimeNumber = false;
					break;
				}
			} int j = 2; int j = 2; j 2 j <= Math.sqrt(num) j Math.sqrt(num) Math.sqrt Math num j++ j++ j {
				if(num % j == 0) {
					isPrimeNumber = false;
					break;
				}
			} {
				if(num % j == 0) {
					isPrimeNumber = false;
					break;
				}
			} if(num % j == 0) {
					isPrimeNumber = false;
					break;
				} num % j == 0 num % j num j 0 {
					isPrimeNumber = false;
					break;
				} isPrimeNumber = false isPrimeNumber false break; if(isPrimeNumber) {
				countResult++;
			} isPrimeNumber {
				countResult++;
			} countResult++ countResult System.out.println(countResult) System.out.println System.out System System.out countResult String[] args args public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader (new InputStreamReader(System.in));

		int countResult = 0;

		int inputNumTimes = Integer.parseInt(br.readLine());

		for(int i = 0; i < inputNumTimes; i++) {
			int num = Integer.parseInt(br.readLine());
			boolean isPrimeNumber = true;

			for(int j = 2; j <= Math.sqrt(num); j++) {
				if(num % j == 0) {
					isPrimeNumber = false;
					break;
				}
			}
			if(isPrimeNumber) {
				countResult++;
			}
		}
		System.out.println(countResult);
	}
} public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader (new InputStreamReader(System.in));

		int countResult = 0;

		int inputNumTimes = Integer.parseInt(br.readLine());

		for(int i = 0; i < inputNumTimes; i++) {
			int num = Integer.parseInt(br.readLine());
			boolean isPrimeNumber = true;

			for(int j = 2; j <= Math.sqrt(num); j++) {
				if(num % j == 0) {
					isPrimeNumber = false;
					break;
				}
			}
			if(isPrimeNumber) {
				countResult++;
			}
		}
		System.out.println(countResult);
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader (new InputStreamReader(System.in));

		int countResult = 0;

		int inputNumTimes = Integer.parseInt(br.readLine());

		for(int i = 0; i < inputNumTimes; i++) {
			int num = Integer.parseInt(br.readLine());
			boolean isPrimeNumber = true;

			for(int j = 2; j <= Math.sqrt(num); j++) {
				if(num % j == 0) {
					isPrimeNumber = false;
					break;
				}
			}
			if(isPrimeNumber) {
				countResult++;
			}
		}
		System.out.println(countResult);
	}
}