import java.util.*;

public class Main {
	
	public static void main(String[] args) {
		
		Scanner input = new Scanner(System.in);
		int size = input.nextInt();
		int[] arr = new int[size];
		
		for(int i = 0; i < size; i++) {
			arr[i] = input.nextInt();
		}
		
		System.out.println(total(arr));
		input.close();
	}
	public static boolean prime(int x) {
		for(int i = 2; i <= (int) Math.sqrt(x); ++i) {
            if(x % i == 0) {
                return false;
            }
        }
		return true;
	}
	
	public static int total(int[] arr) {
		int total = 0;
		for(int i = 0; i < arr.length; i++) {
			if(prime(arr[i])) {
				total++;
			}
		}
		return total;
	}
	
} import java.util.*; util.* java public class Main {
	
	public static void main(String[] args) {
		
		Scanner input = new Scanner(System.in);
		int size = input.nextInt();
		int[] arr = new int[size];
		
		for(int i = 0; i < size; i++) {
			arr[i] = input.nextInt();
		}
		
		System.out.println(total(arr));
		input.close();
	}
	public static boolean prime(int x) {
		for(int i = 2; i <= (int) Math.sqrt(x); ++i) {
            if(x % i == 0) {
                return false;
            }
        }
		return true;
	}
	
	public static int total(int[] arr) {
		int total = 0;
		for(int i = 0; i < arr.length; i++) {
			if(prime(arr[i])) {
				total++;
			}
		}
		return total;
	}
	
} Main public static void main(String[] args) {
		
		Scanner input = new Scanner(System.in);
		int size = input.nextInt();
		int[] arr = new int[size];
		
		for(int i = 0; i < size; i++) {
			arr[i] = input.nextInt();
		}
		
		System.out.println(total(arr));
		input.close();
	} main {
		
		Scanner input = new Scanner(System.in);
		int size = input.nextInt();
		int[] arr = new int[size];
		
		for(int i = 0; i < size; i++) {
			arr[i] = input.nextInt();
		}
		
		System.out.println(total(arr));
		input.close();
	} Scanner input = new Scanner(System.in); input new Scanner(System.in) int size = input.nextInt(); size input.nextInt() input.nextInt input int[] arr = new int[size]; arr new int[size] size for(int i = 0; i < size; i++) {
			arr[i] = input.nextInt();
		} int i = 0; int i = 0; i 0 i < size i size i++ i++ i {
			arr[i] = input.nextInt();
		} {
			arr[i] = input.nextInt();
		} arr[i] = input.nextInt() arr[i] arr i input.nextInt() input.nextInt input System.out.println(total(arr)) System.out.println System.out System System.out total(arr) total arr input.close() input.close input String[] args args public static boolean prime(int x) {
		for(int i = 2; i <= (int) Math.sqrt(x); ++i) {
            if(x % i == 0) {
                return false;
            }
        }
		return true;
	} prime {
		for(int i = 2; i <= (int) Math.sqrt(x); ++i) {
            if(x % i == 0) {
                return false;
            }
        }
		return true;
	} for(int i = 2; i <= (int) Math.sqrt(x); ++i) {
            if(x % i == 0) {
                return false;
            }
        } int i = 2; int i = 2; i 2 i <= (int) Math.sqrt(x) i (int) Math.sqrt(x) Math.sqrt Math x ++i ++i i {
            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 public static int total(int[] arr) {
		int total = 0;
		for(int i = 0; i < arr.length; i++) {
			if(prime(arr[i])) {
				total++;
			}
		}
		return total;
	} total {
		int total = 0;
		for(int i = 0; i < arr.length; i++) {
			if(prime(arr[i])) {
				total++;
			}
		}
		return total;
	} int total = 0; total 0 for(int i = 0; i < arr.length; i++) {
			if(prime(arr[i])) {
				total++;
			}
		} int i = 0; int i = 0; i 0 i < arr.length i arr.length arr arr.length i++ i++ i {
			if(prime(arr[i])) {
				total++;
			}
		} {
			if(prime(arr[i])) {
				total++;
			}
		} if(prime(arr[i])) {
				total++;
			} prime(arr[i]) prime arr[i] arr i {
				total++;
			} total++ total return total; total int[] arr arr public class Main {
	
	public static void main(String[] args) {
		
		Scanner input = new Scanner(System.in);
		int size = input.nextInt();
		int[] arr = new int[size];
		
		for(int i = 0; i < size; i++) {
			arr[i] = input.nextInt();
		}
		
		System.out.println(total(arr));
		input.close();
	}
	public static boolean prime(int x) {
		for(int i = 2; i <= (int) Math.sqrt(x); ++i) {
            if(x % i == 0) {
                return false;
            }
        }
		return true;
	}
	
	public static int total(int[] arr) {
		int total = 0;
		for(int i = 0; i < arr.length; i++) {
			if(prime(arr[i])) {
				total++;
			}
		}
		return total;
	}
	
} public class Main {
	
	public static void main(String[] args) {
		
		Scanner input = new Scanner(System.in);
		int size = input.nextInt();
		int[] arr = new int[size];
		
		for(int i = 0; i < size; i++) {
			arr[i] = input.nextInt();
		}
		
		System.out.println(total(arr));
		input.close();
	}
	public static boolean prime(int x) {
		for(int i = 2; i <= (int) Math.sqrt(x); ++i) {
            if(x % i == 0) {
                return false;
            }
        }
		return true;
	}
	
	public static int total(int[] arr) {
		int total = 0;
		for(int i = 0; i < arr.length; i++) {
			if(prime(arr[i])) {
				total++;
			}
		}
		return total;
	}
	
} Main
import java.util.*;

public class Main {
	
	public static void main(String[] args) {
		
		Scanner input = new Scanner(System.in);
		int size = input.nextInt();
		int[] arr = new int[size];
		
		for(int i = 0; i < size; i++) {
			arr[i] = input.nextInt();
		}
		
		System.out.println(total(arr));
		input.close();
	}
	public static boolean prime(int x) {
		for(int i = 2; i <= (int) Math.sqrt(x); ++i) {
            if(x % i == 0) {
                return false;
            }
        }
		return true;
	}
	
	public static int total(int[] arr) {
		int total = 0;
		for(int i = 0; i < arr.length; i++) {
			if(prime(arr[i])) {
				total++;
			}
		}
		return total;
	}
	
}
