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

public class Main {
	public static void main(String[] args) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
	    
		String x = "";
		
		try {
			int lim = Integer.parseInt(in.readLine());
			
			int ans = 0;
			for (int i = 0; i < lim; i++) {
				x = in.readLine();
				int num = Integer.parseInt(x);

				boolean flag = true;
				for (int j = 2; (j * j) <= num; j++) {
					if (num % j == 0) {
						flag = false;
						break;
					}
				}
				if (flag) ans++;
			}
			System.out.println(ans);
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
} 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) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
	    
		String x = "";
		
		try {
			int lim = Integer.parseInt(in.readLine());
			
			int ans = 0;
			for (int i = 0; i < lim; i++) {
				x = in.readLine();
				int num = Integer.parseInt(x);

				boolean flag = true;
				for (int j = 2; (j * j) <= num; j++) {
					if (num % j == 0) {
						flag = false;
						break;
					}
				}
				if (flag) ans++;
			}
			System.out.println(ans);
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
} Main public static void main(String[] args) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
	    
		String x = "";
		
		try {
			int lim = Integer.parseInt(in.readLine());
			
			int ans = 0;
			for (int i = 0; i < lim; i++) {
				x = in.readLine();
				int num = Integer.parseInt(x);

				boolean flag = true;
				for (int j = 2; (j * j) <= num; j++) {
					if (num % j == 0) {
						flag = false;
						break;
					}
				}
				if (flag) ans++;
			}
			System.out.println(ans);
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	} main {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
	    
		String x = "";
		
		try {
			int lim = Integer.parseInt(in.readLine());
			
			int ans = 0;
			for (int i = 0; i < lim; i++) {
				x = in.readLine();
				int num = Integer.parseInt(x);

				boolean flag = true;
				for (int j = 2; (j * j) <= num; j++) {
					if (num % j == 0) {
						flag = false;
						break;
					}
				}
				if (flag) ans++;
			}
			System.out.println(ans);
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	} BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String x = ""; x "" try {
			int lim = Integer.parseInt(in.readLine());
			
			int ans = 0;
			for (int i = 0; i < lim; i++) {
				x = in.readLine();
				int num = Integer.parseInt(x);

				boolean flag = true;
				for (int j = 2; (j * j) <= num; j++) {
					if (num % j == 0) {
						flag = false;
						break;
					}
				}
				if (flag) ans++;
			}
			System.out.println(ans);
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} NumberFormatException e {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} IOException e {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			int lim = Integer.parseInt(in.readLine());
			
			int ans = 0;
			for (int i = 0; i < lim; i++) {
				x = in.readLine();
				int num = Integer.parseInt(x);

				boolean flag = true;
				for (int j = 2; (j * j) <= num; j++) {
					if (num % j == 0) {
						flag = false;
						break;
					}
				}
				if (flag) ans++;
			}
			System.out.println(ans);
		} int lim = Integer.parseInt(in.readLine()); lim Integer.parseInt(in.readLine()) Integer.parseInt Integer in.readLine() in.readLine in int ans = 0; ans 0 for (int i = 0; i < lim; i++) {
				x = in.readLine();
				int num = Integer.parseInt(x);

				boolean flag = true;
				for (int j = 2; (j * j) <= num; j++) {
					if (num % j == 0) {
						flag = false;
						break;
					}
				}
				if (flag) ans++;
			} int i = 0; int i = 0; i 0 i < lim i lim i++ i++ i {
				x = in.readLine();
				int num = Integer.parseInt(x);

				boolean flag = true;
				for (int j = 2; (j * j) <= num; j++) {
					if (num % j == 0) {
						flag = false;
						break;
					}
				}
				if (flag) ans++;
			} {
				x = in.readLine();
				int num = Integer.parseInt(x);

				boolean flag = true;
				for (int j = 2; (j * j) <= num; j++) {
					if (num % j == 0) {
						flag = false;
						break;
					}
				}
				if (flag) ans++;
			} x = in.readLine() x in.readLine() in.readLine in int num = Integer.parseInt(x); num Integer.parseInt(x) Integer.parseInt Integer x boolean flag = true; flag true for (int j = 2; (j * j) <= num; j++) {
					if (num % j == 0) {
						flag = false;
						break;
					}
				} int j = 2; int j = 2; j 2 (j * j) <= num (j * j) j j num j++ j++ j {
					if (num % j == 0) {
						flag = false;
						break;
					}
				} {
					if (num % j == 0) {
						flag = false;
						break;
					}
				} if (num % j == 0) {
						flag = false;
						break;
					} num % j == 0 num % j num j 0 {
						flag = false;
						break;
					} flag = false flag false break; if (flag) ans++; flag ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
	    
		String x = "";
		
		try {
			int lim = Integer.parseInt(in.readLine());
			
			int ans = 0;
			for (int i = 0; i < lim; i++) {
				x = in.readLine();
				int num = Integer.parseInt(x);

				boolean flag = true;
				for (int j = 2; (j * j) <= num; j++) {
					if (num % j == 0) {
						flag = false;
						break;
					}
				}
				if (flag) ans++;
			}
			System.out.println(ans);
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
} public class Main {
	public static void main(String[] args) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
	    
		String x = "";
		
		try {
			int lim = Integer.parseInt(in.readLine());
			
			int ans = 0;
			for (int i = 0; i < lim; i++) {
				x = in.readLine();
				int num = Integer.parseInt(x);

				boolean flag = true;
				for (int j = 2; (j * j) <= num; j++) {
					if (num % j == 0) {
						flag = false;
						break;
					}
				}
				if (flag) ans++;
			}
			System.out.println(ans);
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
	    
		String x = "";
		
		try {
			int lim = Integer.parseInt(in.readLine());
			
			int ans = 0;
			for (int i = 0; i < lim; i++) {
				x = in.readLine();
				int num = Integer.parseInt(x);

				boolean flag = true;
				for (int j = 2; (j * j) <= num; j++) {
					if (num % j == 0) {
						flag = false;
						break;
					}
				}
				if (flag) ans++;
			}
			System.out.println(ans);
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}