import java.util.InputMismatchException;
import java.util.Scanner;

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

		try {
			int num = sc.nextInt();

			int[] values = new int[num];
			int count = 0;

			for(int i = 0; i < values.length; i++) {
				values[i] = sc.nextInt();

				if(isPrime(values[i])) {count++;}
			}

			System.out.println(count);
		} catch(InputMismatchException ex) {
			ex.printStackTrace();
		} finally {
			sc.close();
		}
	}

	private static boolean isPrime(int val) {
		if(val == 2 || val == 3) {return true;}
		if(val % 2 == 0) {return false;}

		for(int i = 3; i <= Math.sqrt((double)val); i += 2) {
			if(val % i == 0) {return false;}
		}

		return true;
	}
}
 import java.util.InputMismatchException; InputMismatchException java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		try {
			int num = sc.nextInt();

			int[] values = new int[num];
			int count = 0;

			for(int i = 0; i < values.length; i++) {
				values[i] = sc.nextInt();

				if(isPrime(values[i])) {count++;}
			}

			System.out.println(count);
		} catch(InputMismatchException ex) {
			ex.printStackTrace();
		} finally {
			sc.close();
		}
	}

	private static boolean isPrime(int val) {
		if(val == 2 || val == 3) {return true;}
		if(val % 2 == 0) {return false;}

		for(int i = 3; i <= Math.sqrt((double)val); i += 2) {
			if(val % i == 0) {return false;}
		}

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

		try {
			int num = sc.nextInt();

			int[] values = new int[num];
			int count = 0;

			for(int i = 0; i < values.length; i++) {
				values[i] = sc.nextInt();

				if(isPrime(values[i])) {count++;}
			}

			System.out.println(count);
		} catch(InputMismatchException ex) {
			ex.printStackTrace();
		} finally {
			sc.close();
		}
	} main {
		Scanner sc = new Scanner(System.in);

		try {
			int num = sc.nextInt();

			int[] values = new int[num];
			int count = 0;

			for(int i = 0; i < values.length; i++) {
				values[i] = sc.nextInt();

				if(isPrime(values[i])) {count++;}
			}

			System.out.println(count);
		} catch(InputMismatchException ex) {
			ex.printStackTrace();
		} finally {
			sc.close();
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) try {
			int num = sc.nextInt();

			int[] values = new int[num];
			int count = 0;

			for(int i = 0; i < values.length; i++) {
				values[i] = sc.nextInt();

				if(isPrime(values[i])) {count++;}
			}

			System.out.println(count);
		} catch(InputMismatchException ex) {
			ex.printStackTrace();
		} finally {
			sc.close();
		} catch(InputMismatchException ex) {
			ex.printStackTrace();
		} InputMismatchException ex {
			ex.printStackTrace();
		} ex.printStackTrace() ex.printStackTrace ex {
			sc.close();
		} sc.close() sc.close sc {
			int num = sc.nextInt();

			int[] values = new int[num];
			int count = 0;

			for(int i = 0; i < values.length; i++) {
				values[i] = sc.nextInt();

				if(isPrime(values[i])) {count++;}
			}

			System.out.println(count);
		} int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc int[] values = new int[num]; values new int[num] num int count = 0; count 0 for(int i = 0; i < values.length; i++) {
				values[i] = sc.nextInt();

				if(isPrime(values[i])) {count++;}
			} int i = 0; int i = 0; i 0 i < values.length i values.length values values.length i++ i++ i {
				values[i] = sc.nextInt();

				if(isPrime(values[i])) {count++;}
			} {
				values[i] = sc.nextInt();

				if(isPrime(values[i])) {count++;}
			} values[i] = sc.nextInt() values[i] values i sc.nextInt() sc.nextInt sc if(isPrime(values[i])) {count++;} isPrime(values[i]) isPrime values[i] values i {count++;} count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args private static boolean isPrime(int val) {
		if(val == 2 || val == 3) {return true;}
		if(val % 2 == 0) {return false;}

		for(int i = 3; i <= Math.sqrt((double)val); i += 2) {
			if(val % i == 0) {return false;}
		}

		return true;
	} isPrime {
		if(val == 2 || val == 3) {return true;}
		if(val % 2 == 0) {return false;}

		for(int i = 3; i <= Math.sqrt((double)val); i += 2) {
			if(val % i == 0) {return false;}
		}

		return true;
	} if(val == 2 || val == 3) {return true;} val == 2 || val == 3 val == 2 val 2 val == 3 val 3 {return true;} return true; true if(val % 2 == 0) {return false;} val % 2 == 0 val % 2 val 2 0 {return false;} return false; false for(int i = 3; i <= Math.sqrt((double)val); i += 2) {
			if(val % i == 0) {return false;}
		} int i = 3; int i = 3; i 3 i <= Math.sqrt((double)val) i Math.sqrt((double)val) Math.sqrt Math (double)val i += 2 i += 2 i 2 {
			if(val % i == 0) {return false;}
		} {
			if(val % i == 0) {return false;}
		} if(val % i == 0) {return false;} val % i == 0 val % i val i 0 {return false;} return false; false return true; true int val val public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		try {
			int num = sc.nextInt();

			int[] values = new int[num];
			int count = 0;

			for(int i = 0; i < values.length; i++) {
				values[i] = sc.nextInt();

				if(isPrime(values[i])) {count++;}
			}

			System.out.println(count);
		} catch(InputMismatchException ex) {
			ex.printStackTrace();
		} finally {
			sc.close();
		}
	}

	private static boolean isPrime(int val) {
		if(val == 2 || val == 3) {return true;}
		if(val % 2 == 0) {return false;}

		for(int i = 3; i <= Math.sqrt((double)val); i += 2) {
			if(val % i == 0) {return false;}
		}

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

		try {
			int num = sc.nextInt();

			int[] values = new int[num];
			int count = 0;

			for(int i = 0; i < values.length; i++) {
				values[i] = sc.nextInt();

				if(isPrime(values[i])) {count++;}
			}

			System.out.println(count);
		} catch(InputMismatchException ex) {
			ex.printStackTrace();
		} finally {
			sc.close();
		}
	}

	private static boolean isPrime(int val) {
		if(val == 2 || val == 3) {return true;}
		if(val % 2 == 0) {return false;}

		for(int i = 3; i <= Math.sqrt((double)val); i += 2) {
			if(val % i == 0) {return false;}
		}

		return true;
	}
} Main
import java.util.InputMismatchException;
import java.util.Scanner;

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

		try {
			int num = sc.nextInt();

			int[] values = new int[num];
			int count = 0;

			for(int i = 0; i < values.length; i++) {
				values[i] = sc.nextInt();

				if(isPrime(values[i])) {count++;}
			}

			System.out.println(count);
		} catch(InputMismatchException ex) {
			ex.printStackTrace();
		} finally {
			sc.close();
		}
	}

	private static boolean isPrime(int val) {
		if(val == 2 || val == 3) {return true;}
		if(val % 2 == 0) {return false;}

		for(int i = 3; i <= Math.sqrt((double)val); i += 2) {
			if(val % i == 0) {return false;}
		}

		return true;
	}
}

