import java.util.Arrays;
import java.util.Scanner;

public class Main {
	void run() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int count = 0;
		for(int i = 0; i < n; i++) {
			int a = sc.nextInt();
			boolean b = isPrime(a);	
			if(b == true) {
				count++;
			}
		}
		System.out.println(count);
		
				
		sc.close();
	}
	
	boolean isPrime(int x) {
		if(x == 2) return true;
		else if(x < 2 || x % 2 == 0) return false;
		else {
			for(int i = 3; i <= Math.sqrt(x); i += 2) {
				if(x%i==0) {
					return false;
				}
			}
			return true;
		}
	}

	void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}

	public static void main(String[] args) {
		new Main().run();
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
	void run() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int count = 0;
		for(int i = 0; i < n; i++) {
			int a = sc.nextInt();
			boolean b = isPrime(a);	
			if(b == true) {
				count++;
			}
		}
		System.out.println(count);
		
				
		sc.close();
	}
	
	boolean isPrime(int x) {
		if(x == 2) return true;
		else if(x < 2 || x % 2 == 0) return false;
		else {
			for(int i = 3; i <= Math.sqrt(x); i += 2) {
				if(x%i==0) {
					return false;
				}
			}
			return true;
		}
	}

	void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}

	public static void main(String[] args) {
		new Main().run();
	}
} Main void run() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int count = 0;
		for(int i = 0; i < n; i++) {
			int a = sc.nextInt();
			boolean b = isPrime(a);	
			if(b == true) {
				count++;
			}
		}
		System.out.println(count);
		
				
		sc.close();
	} run {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int count = 0;
		for(int i = 0; i < n; i++) {
			int a = sc.nextInt();
			boolean b = isPrime(a);	
			if(b == true) {
				count++;
			}
		}
		System.out.println(count);
		
				
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int count = 0; count 0 for(int i = 0; i < n; i++) {
			int a = sc.nextInt();
			boolean b = isPrime(a);	
			if(b == true) {
				count++;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int a = sc.nextInt();
			boolean b = isPrime(a);	
			if(b == true) {
				count++;
			}
		} {
			int a = sc.nextInt();
			boolean b = isPrime(a);	
			if(b == true) {
				count++;
			}
		} int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc boolean b = isPrime(a); b isPrime(a) isPrime a if(b == true) {
				count++;
			} b == true b true {
				count++;
			} count++ count System.out.println(count) System.out.println System.out System System.out count sc.close() sc.close sc boolean isPrime(int x) {
		if(x == 2) return true;
		else if(x < 2 || x % 2 == 0) return false;
		else {
			for(int i = 3; i <= Math.sqrt(x); i += 2) {
				if(x%i==0) {
					return false;
				}
			}
			return true;
		}
	} isPrime {
		if(x == 2) return true;
		else if(x < 2 || x % 2 == 0) return false;
		else {
			for(int i = 3; i <= Math.sqrt(x); i += 2) {
				if(x%i==0) {
					return false;
				}
			}
			return true;
		}
	} if(x == 2) return true;
		else if(x < 2 || x % 2 == 0) return false;
		else {
			for(int i = 3; i <= Math.sqrt(x); i += 2) {
				if(x%i==0) {
					return false;
				}
			}
			return true;
		} x == 2 x 2 return true; true if(x < 2 || x % 2 == 0) return false;
		else {
			for(int i = 3; i <= Math.sqrt(x); i += 2) {
				if(x%i==0) {
					return false;
				}
			}
			return true;
		} x < 2 || x % 2 == 0 x < 2 x 2 x % 2 == 0 x % 2 x 2 0 return false; false {
			for(int i = 3; i <= Math.sqrt(x); i += 2) {
				if(x%i==0) {
					return false;
				}
			}
			return true;
		} for(int i = 3; i <= Math.sqrt(x); i += 2) {
				if(x%i==0) {
					return false;
				}
			} int i = 3; int i = 3; i 3 i <= Math.sqrt(x) i Math.sqrt(x) Math.sqrt Math x i += 2 i += 2 i 2 {
				if(x%i==0) {
					return false;
				}
			} {
				if(x%i==0) {
					return false;
				}
			} if(x%i==0) {
					return false;
				} x%i==0 x%i x i 0 {
					return false;
				} return false; false return true; true int x x void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	} debug {
		System.out.println(Arrays.deepToString(o));
	} System.out.println(Arrays.deepToString(o)) System.out.println System.out System System.out Arrays.deepToString(o) Arrays.deepToString Arrays o Object... o o public static void main(String[] args) {
		new Main().run();
	} main {
		new Main().run();
	} new Main().run() new Main().run new Main() String[] args args public class Main {
	void run() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int count = 0;
		for(int i = 0; i < n; i++) {
			int a = sc.nextInt();
			boolean b = isPrime(a);	
			if(b == true) {
				count++;
			}
		}
		System.out.println(count);
		
				
		sc.close();
	}
	
	boolean isPrime(int x) {
		if(x == 2) return true;
		else if(x < 2 || x % 2 == 0) return false;
		else {
			for(int i = 3; i <= Math.sqrt(x); i += 2) {
				if(x%i==0) {
					return false;
				}
			}
			return true;
		}
	}

	void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}

	public static void main(String[] args) {
		new Main().run();
	}
} public class Main {
	void run() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int count = 0;
		for(int i = 0; i < n; i++) {
			int a = sc.nextInt();
			boolean b = isPrime(a);	
			if(b == true) {
				count++;
			}
		}
		System.out.println(count);
		
				
		sc.close();
	}
	
	boolean isPrime(int x) {
		if(x == 2) return true;
		else if(x < 2 || x % 2 == 0) return false;
		else {
			for(int i = 3; i <= Math.sqrt(x); i += 2) {
				if(x%i==0) {
					return false;
				}
			}
			return true;
		}
	}

	void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}

	public static void main(String[] args) {
		new Main().run();
	}
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	void run() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int count = 0;
		for(int i = 0; i < n; i++) {
			int a = sc.nextInt();
			boolean b = isPrime(a);	
			if(b == true) {
				count++;
			}
		}
		System.out.println(count);
		
				
		sc.close();
	}
	
	boolean isPrime(int x) {
		if(x == 2) return true;
		else if(x < 2 || x % 2 == 0) return false;
		else {
			for(int i = 3; i <= Math.sqrt(x); i += 2) {
				if(x%i==0) {
					return false;
				}
			}
			return true;
		}
	}

	void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}

	public static void main(String[] args) {
		new Main().run();
	}
}
