import java.util.Scanner;


public final class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n= scan.nextInt();
		
		int count=0;
		for (int i=0;i<n;i++) {
			if (isPrime(scan.nextInt()))count++;
		}
		System.out.println(count);
	}
	static boolean isPrime(int n) {
		if (n<2) return false;
		for (int i=2;i*i<=n;i++) {
			if (n%i==0) return false;
		}
		return true;
	}
} import java.util.Scanner; Scanner java.util public final class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n= scan.nextInt();
		
		int count=0;
		for (int i=0;i<n;i++) {
			if (isPrime(scan.nextInt()))count++;
		}
		System.out.println(count);
	}
	static boolean isPrime(int n) {
		if (n<2) return false;
		for (int i=2;i*i<=n;i++) {
			if (n%i==0) return false;
		}
		return true;
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n= scan.nextInt();
		
		int count=0;
		for (int i=0;i<n;i++) {
			if (isPrime(scan.nextInt()))count++;
		}
		System.out.println(count);
	} main {
		Scanner scan = new Scanner(System.in);
		int n= scan.nextInt();
		
		int count=0;
		for (int i=0;i<n;i++) {
			if (isPrime(scan.nextInt()))count++;
		}
		System.out.println(count);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n= scan.nextInt(); n scan.nextInt() scan.nextInt scan int count=0; count 0 for (int i=0;i<n;i++) {
			if (isPrime(scan.nextInt()))count++;
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			if (isPrime(scan.nextInt()))count++;
		} {
			if (isPrime(scan.nextInt()))count++;
		} if (isPrime(scan.nextInt()))count++; isPrime(scan.nextInt()) isPrime scan.nextInt() scan.nextInt scan count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args static boolean isPrime(int n) {
		if (n<2) return false;
		for (int i=2;i*i<=n;i++) {
			if (n%i==0) return false;
		}
		return true;
	} isPrime {
		if (n<2) return false;
		for (int i=2;i*i<=n;i++) {
			if (n%i==0) return false;
		}
		return true;
	} if (n<2) return false; n<2 n 2 return false; false 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; false return true; true int n n public final class Main {

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

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n= scan.nextInt();
		
		int count=0;
		for (int i=0;i<n;i++) {
			if (isPrime(scan.nextInt()))count++;
		}
		System.out.println(count);
	}
	static boolean isPrime(int n) {
		if (n<2) return false;
		for (int i=2;i*i<=n;i++) {
			if (n%i==0) return false;
		}
		return true;
	}
} Main
import java.util.Scanner;


public final class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n= scan.nextInt();
		
		int count=0;
		for (int i=0;i<n;i++) {
			if (isPrime(scan.nextInt()))count++;
		}
		System.out.println(count);
	}
	static boolean isPrime(int n) {
		if (n<2) return false;
		for (int i=2;i*i<=n;i++) {
			if (n%i==0) return false;
		}
		return true;
	}
}