import java.util.Scanner;

public class Main {

	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {

		int n = sc.nextInt();
		int[] nums = inpNum(n);
		int num_prime = judgePrime(nums);
		System.out.println(num_prime);

		sc.close();
	}

	private static int judgePrime(int[] nums) {
		int num_prime = 0;
		boolean isPrime = true;

		for(int i = 0; i < nums.length; i++) {

			int sqrt = (int)Math.sqrt(nums[i]);
			isPrime = true;

				for (int j = 2; j <= sqrt ;j++) {
					if (nums[i] % j == 0) {
						isPrime = false;
						break;
					}
				}

			if (isPrime == true) {
				num_prime++;
			}

		}



		return num_prime;
	}

	private static int[] inpNum(int n) {
		int[] nums = new int[n];

		for (int i = 0; i < n; i++) {
			nums[i] = sc.nextInt();
		}
		return nums;
	}

} import java.util.Scanner; Scanner java.util public class Main {

	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {

		int n = sc.nextInt();
		int[] nums = inpNum(n);
		int num_prime = judgePrime(nums);
		System.out.println(num_prime);

		sc.close();
	}

	private static int judgePrime(int[] nums) {
		int num_prime = 0;
		boolean isPrime = true;

		for(int i = 0; i < nums.length; i++) {

			int sqrt = (int)Math.sqrt(nums[i]);
			isPrime = true;

				for (int j = 2; j <= sqrt ;j++) {
					if (nums[i] % j == 0) {
						isPrime = false;
						break;
					}
				}

			if (isPrime == true) {
				num_prime++;
			}

		}



		return num_prime;
	}

	private static int[] inpNum(int n) {
		int[] nums = new int[n];

		for (int i = 0; i < n; i++) {
			nums[i] = sc.nextInt();
		}
		return nums;
	}

} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {

		int n = sc.nextInt();
		int[] nums = inpNum(n);
		int num_prime = judgePrime(nums);
		System.out.println(num_prime);

		sc.close();
	} main {

		int n = sc.nextInt();
		int[] nums = inpNum(n);
		int num_prime = judgePrime(nums);
		System.out.println(num_prime);

		sc.close();
	} int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] nums = inpNum(n); nums inpNum(n) inpNum n int num_prime = judgePrime(nums); num_prime judgePrime(nums) judgePrime nums System.out.println(num_prime) System.out.println System.out System System.out num_prime sc.close() sc.close sc String[] args args private static int judgePrime(int[] nums) {
		int num_prime = 0;
		boolean isPrime = true;

		for(int i = 0; i < nums.length; i++) {

			int sqrt = (int)Math.sqrt(nums[i]);
			isPrime = true;

				for (int j = 2; j <= sqrt ;j++) {
					if (nums[i] % j == 0) {
						isPrime = false;
						break;
					}
				}

			if (isPrime == true) {
				num_prime++;
			}

		}



		return num_prime;
	} judgePrime {
		int num_prime = 0;
		boolean isPrime = true;

		for(int i = 0; i < nums.length; i++) {

			int sqrt = (int)Math.sqrt(nums[i]);
			isPrime = true;

				for (int j = 2; j <= sqrt ;j++) {
					if (nums[i] % j == 0) {
						isPrime = false;
						break;
					}
				}

			if (isPrime == true) {
				num_prime++;
			}

		}



		return num_prime;
	} int num_prime = 0; num_prime 0 boolean isPrime = true; isPrime true for(int i = 0; i < nums.length; i++) {

			int sqrt = (int)Math.sqrt(nums[i]);
			isPrime = true;

				for (int j = 2; j <= sqrt ;j++) {
					if (nums[i] % j == 0) {
						isPrime = false;
						break;
					}
				}

			if (isPrime == true) {
				num_prime++;
			}

		} int i = 0; int i = 0; i 0 i < nums.length i nums.length nums nums.length i++ i++ i {

			int sqrt = (int)Math.sqrt(nums[i]);
			isPrime = true;

				for (int j = 2; j <= sqrt ;j++) {
					if (nums[i] % j == 0) {
						isPrime = false;
						break;
					}
				}

			if (isPrime == true) {
				num_prime++;
			}

		} {

			int sqrt = (int)Math.sqrt(nums[i]);
			isPrime = true;

				for (int j = 2; j <= sqrt ;j++) {
					if (nums[i] % j == 0) {
						isPrime = false;
						break;
					}
				}

			if (isPrime == true) {
				num_prime++;
			}

		} int sqrt = (int)Math.sqrt(nums[i]); sqrt (int)Math.sqrt(nums[i]) Math.sqrt Math nums[i] nums i isPrime = true isPrime true for (int j = 2; j <= sqrt ;j++) {
					if (nums[i] % j == 0) {
						isPrime = false;
						break;
					}
				} int j = 2; int j = 2; j 2 j <= sqrt j sqrt j++ j++ j {
					if (nums[i] % j == 0) {
						isPrime = false;
						break;
					}
				} {
					if (nums[i] % j == 0) {
						isPrime = false;
						break;
					}
				} if (nums[i] % j == 0) {
						isPrime = false;
						break;
					} nums[i] % j == 0 nums[i] % j nums[i] nums i j 0 {
						isPrime = false;
						break;
					} isPrime = false isPrime false break; if (isPrime == true) {
				num_prime++;
			} isPrime == true isPrime true {
				num_prime++;
			} num_prime++ num_prime return num_prime; num_prime int[] nums nums private static int[] inpNum(int n) {
		int[] nums = new int[n];

		for (int i = 0; i < n; i++) {
			nums[i] = sc.nextInt();
		}
		return nums;
	} inpNum {
		int[] nums = new int[n];

		for (int i = 0; i < n; i++) {
			nums[i] = sc.nextInt();
		}
		return nums;
	} int[] nums = new int[n]; nums new int[n] n for (int i = 0; i < n; i++) {
			nums[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			nums[i] = sc.nextInt();
		} {
			nums[i] = sc.nextInt();
		} nums[i] = sc.nextInt() nums[i] nums i sc.nextInt() sc.nextInt sc return nums; nums int n n public class Main {

	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {

		int n = sc.nextInt();
		int[] nums = inpNum(n);
		int num_prime = judgePrime(nums);
		System.out.println(num_prime);

		sc.close();
	}

	private static int judgePrime(int[] nums) {
		int num_prime = 0;
		boolean isPrime = true;

		for(int i = 0; i < nums.length; i++) {

			int sqrt = (int)Math.sqrt(nums[i]);
			isPrime = true;

				for (int j = 2; j <= sqrt ;j++) {
					if (nums[i] % j == 0) {
						isPrime = false;
						break;
					}
				}

			if (isPrime == true) {
				num_prime++;
			}

		}



		return num_prime;
	}

	private static int[] inpNum(int n) {
		int[] nums = new int[n];

		for (int i = 0; i < n; i++) {
			nums[i] = sc.nextInt();
		}
		return nums;
	}

} public class Main {

	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {

		int n = sc.nextInt();
		int[] nums = inpNum(n);
		int num_prime = judgePrime(nums);
		System.out.println(num_prime);

		sc.close();
	}

	private static int judgePrime(int[] nums) {
		int num_prime = 0;
		boolean isPrime = true;

		for(int i = 0; i < nums.length; i++) {

			int sqrt = (int)Math.sqrt(nums[i]);
			isPrime = true;

				for (int j = 2; j <= sqrt ;j++) {
					if (nums[i] % j == 0) {
						isPrime = false;
						break;
					}
				}

			if (isPrime == true) {
				num_prime++;
			}

		}



		return num_prime;
	}

	private static int[] inpNum(int n) {
		int[] nums = new int[n];

		for (int i = 0; i < n; i++) {
			nums[i] = sc.nextInt();
		}
		return nums;
	}

} Main
import java.util.Scanner;

public class Main {

	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {

		int n = sc.nextInt();
		int[] nums = inpNum(n);
		int num_prime = judgePrime(nums);
		System.out.println(num_prime);

		sc.close();
	}

	private static int judgePrime(int[] nums) {
		int num_prime = 0;
		boolean isPrime = true;

		for(int i = 0; i < nums.length; i++) {

			int sqrt = (int)Math.sqrt(nums[i]);
			isPrime = true;

				for (int j = 2; j <= sqrt ;j++) {
					if (nums[i] % j == 0) {
						isPrime = false;
						break;
					}
				}

			if (isPrime == true) {
				num_prime++;
			}

		}



		return num_prime;
	}

	private static int[] inpNum(int n) {
		int[] nums = new int[n];

		for (int i = 0; i < n; i++) {
			nums[i] = sc.nextInt();
		}
		return nums;
	}

}
