import java.io.IOException;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws IOException {

		Scanner scan = new Scanner(System.in);
		Main main = new Main();

		int n = scan.nextInt();
		int count = 0;
		for(int i = 0 ; i < n ; i++) {
			int num = scan.nextInt();
			if(num !=1 && main.test(num)) {
				count++;
			}
		}
		System.out.println(count);

	}

	boolean test(int n){
		for (int i = 2 ; i*i <= n ; i++) {
			if(n % i == 0) {
				return false;
			}
		}
		return true;
	}

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

	public static void main(String[] args) throws IOException {

		Scanner scan = new Scanner(System.in);
		Main main = new Main();

		int n = scan.nextInt();
		int count = 0;
		for(int i = 0 ; i < n ; i++) {
			int num = scan.nextInt();
			if(num !=1 && main.test(num)) {
				count++;
			}
		}
		System.out.println(count);

	}

	boolean test(int n){
		for (int i = 2 ; i*i <= n ; i++) {
			if(n % i == 0) {
				return false;
			}
		}
		return true;
	}

} Main public static void main(String[] args) throws IOException {

		Scanner scan = new Scanner(System.in);
		Main main = new Main();

		int n = scan.nextInt();
		int count = 0;
		for(int i = 0 ; i < n ; i++) {
			int num = scan.nextInt();
			if(num !=1 && main.test(num)) {
				count++;
			}
		}
		System.out.println(count);

	} main {

		Scanner scan = new Scanner(System.in);
		Main main = new Main();

		int n = scan.nextInt();
		int count = 0;
		for(int i = 0 ; i < n ; i++) {
			int num = scan.nextInt();
			if(num !=1 && main.test(num)) {
				count++;
			}
		}
		System.out.println(count);

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) Main main = new Main(); main new Main() int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int count = 0; count 0 for(int i = 0 ; i < n ; i++) {
			int num = scan.nextInt();
			if(num !=1 && main.test(num)) {
				count++;
			}
		} int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
			int num = scan.nextInt();
			if(num !=1 && main.test(num)) {
				count++;
			}
		} {
			int num = scan.nextInt();
			if(num !=1 && main.test(num)) {
				count++;
			}
		} int num = scan.nextInt(); num scan.nextInt() scan.nextInt scan if(num !=1 && main.test(num)) {
				count++;
			} num !=1 && main.test(num) num !=1 num 1 main.test(num) main.test main num {
				count++;
			} count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args boolean test(int n){
		for (int i = 2 ; i*i <= n ; i++) {
			if(n % i == 0) {
				return false;
			}
		}
		return true;
	} test {
		for (int i = 2 ; i*i <= n ; i++) {
			if(n % i == 0) {
				return false;
			}
		}
		return true;
	} for (int i = 2 ; i*i <= n ; i++) {
			if(n % i == 0) {
				return false;
			}
		} int i = 2 ; int i = 2 ; i 2 i*i <= n i*i i i n i++ i++ i {
			if(n % i == 0) {
				return false;
			}
		} {
			if(n % i == 0) {
				return false;
			}
		} if(n % i == 0) {
				return false;
			} n % i == 0 n % i n i 0 {
				return false;
			} return false; false return true; true int n n public class Main {

	public static void main(String[] args) throws IOException {

		Scanner scan = new Scanner(System.in);
		Main main = new Main();

		int n = scan.nextInt();
		int count = 0;
		for(int i = 0 ; i < n ; i++) {
			int num = scan.nextInt();
			if(num !=1 && main.test(num)) {
				count++;
			}
		}
		System.out.println(count);

	}

	boolean test(int n){
		for (int i = 2 ; i*i <= n ; i++) {
			if(n % i == 0) {
				return false;
			}
		}
		return true;
	}

} public class Main {

	public static void main(String[] args) throws IOException {

		Scanner scan = new Scanner(System.in);
		Main main = new Main();

		int n = scan.nextInt();
		int count = 0;
		for(int i = 0 ; i < n ; i++) {
			int num = scan.nextInt();
			if(num !=1 && main.test(num)) {
				count++;
			}
		}
		System.out.println(count);

	}

	boolean test(int n){
		for (int i = 2 ; i*i <= n ; i++) {
			if(n % i == 0) {
				return false;
			}
		}
		return true;
	}

} Main
import java.io.IOException;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws IOException {

		Scanner scan = new Scanner(System.in);
		Main main = new Main();

		int n = scan.nextInt();
		int count = 0;
		for(int i = 0 ; i < n ; i++) {
			int num = scan.nextInt();
			if(num !=1 && main.test(num)) {
				count++;
			}
		}
		System.out.println(count);

	}

	boolean test(int n){
		for (int i = 2 ; i*i <= n ; i++) {
			if(n % i == 0) {
				return false;
			}
		}
		return true;
	}

}

