import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		int n = scan.nextInt();
		int[] arr = new int[n];
		int count = 0;
		for(int i = 0; i < n; i++){
			arr[i] = scan.nextInt();
			if(isPrime(arr[i])){
				count++;
			}
		}
		System.out.printf("%d\n", count);
	}

	public static boolean isPrime(int x){
		if(x == 2)
			return true;
		if(x < 2 || x % 2 == 0)
			return false;
		int i = 3;
		while(i <= Math.sqrt(x)){
			if(x % i == 0)
				return false;
			i += 2;
		}
		return true;
	}
} import java.util.*; util.* java public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		int n = scan.nextInt();
		int[] arr = new int[n];
		int count = 0;
		for(int i = 0; i < n; i++){
			arr[i] = scan.nextInt();
			if(isPrime(arr[i])){
				count++;
			}
		}
		System.out.printf("%d\n", count);
	}

	public static boolean isPrime(int x){
		if(x == 2)
			return true;
		if(x < 2 || x % 2 == 0)
			return false;
		int i = 3;
		while(i <= Math.sqrt(x)){
			if(x % i == 0)
				return false;
			i += 2;
		}
		return true;
	}
} Main private static final Scanner scan = new Scanner(System.in); scan new Scanner(System.in) public static void main(String[] args){
		int n = scan.nextInt();
		int[] arr = new int[n];
		int count = 0;
		for(int i = 0; i < n; i++){
			arr[i] = scan.nextInt();
			if(isPrime(arr[i])){
				count++;
			}
		}
		System.out.printf("%d\n", count);
	} main {
		int n = scan.nextInt();
		int[] arr = new int[n];
		int count = 0;
		for(int i = 0; i < n; i++){
			arr[i] = scan.nextInt();
			if(isPrime(arr[i])){
				count++;
			}
		}
		System.out.printf("%d\n", count);
	} int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int[] arr = new int[n]; arr new int[n] n int count = 0; count 0 for(int i = 0; i < n; i++){
			arr[i] = scan.nextInt();
			if(isPrime(arr[i])){
				count++;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			arr[i] = scan.nextInt();
			if(isPrime(arr[i])){
				count++;
			}
		} {
			arr[i] = scan.nextInt();
			if(isPrime(arr[i])){
				count++;
			}
		} arr[i] = scan.nextInt() arr[i] arr i scan.nextInt() scan.nextInt scan if(isPrime(arr[i])){
				count++;
			} isPrime(arr[i]) isPrime arr[i] arr i {
				count++;
			} count++ count System.out.printf("%d\n", count) System.out.printf System.out System System.out "%d\n" count String[] args args public static boolean isPrime(int x){
		if(x == 2)
			return true;
		if(x < 2 || x % 2 == 0)
			return false;
		int i = 3;
		while(i <= Math.sqrt(x)){
			if(x % i == 0)
				return false;
			i += 2;
		}
		return true;
	} isPrime {
		if(x == 2)
			return true;
		if(x < 2 || x % 2 == 0)
			return false;
		int i = 3;
		while(i <= Math.sqrt(x)){
			if(x % i == 0)
				return false;
			i += 2;
		}
		return true;
	} if(x == 2)
			return true; x == 2 x 2 return true; true if(x < 2 || x % 2 == 0)
			return false; x < 2 || x % 2 == 0 x < 2 x 2 x % 2 == 0 x % 2 x 2 0 return false; false int i = 3; i 3 while(i <= Math.sqrt(x)){
			if(x % i == 0)
				return false;
			i += 2;
		} i <= Math.sqrt(x) i Math.sqrt(x) Math.sqrt Math x {
			if(x % i == 0)
				return false;
			i += 2;
		} if(x % i == 0)
				return false; x % i == 0 x % i x i 0 return false; false i += 2 i 2 return true; true int x x public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		int n = scan.nextInt();
		int[] arr = new int[n];
		int count = 0;
		for(int i = 0; i < n; i++){
			arr[i] = scan.nextInt();
			if(isPrime(arr[i])){
				count++;
			}
		}
		System.out.printf("%d\n", count);
	}

	public static boolean isPrime(int x){
		if(x == 2)
			return true;
		if(x < 2 || x % 2 == 0)
			return false;
		int i = 3;
		while(i <= Math.sqrt(x)){
			if(x % i == 0)
				return false;
			i += 2;
		}
		return true;
	}
} public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		int n = scan.nextInt();
		int[] arr = new int[n];
		int count = 0;
		for(int i = 0; i < n; i++){
			arr[i] = scan.nextInt();
			if(isPrime(arr[i])){
				count++;
			}
		}
		System.out.printf("%d\n", count);
	}

	public static boolean isPrime(int x){
		if(x == 2)
			return true;
		if(x < 2 || x % 2 == 0)
			return false;
		int i = 3;
		while(i <= Math.sqrt(x)){
			if(x % i == 0)
				return false;
			i += 2;
		}
		return true;
	}
} Main
import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		int n = scan.nextInt();
		int[] arr = new int[n];
		int count = 0;
		for(int i = 0; i < n; i++){
			arr[i] = scan.nextInt();
			if(isPrime(arr[i])){
				count++;
			}
		}
		System.out.printf("%d\n", count);
	}

	public static boolean isPrime(int x){
		if(x == 2)
			return true;
		if(x < 2 || x % 2 == 0)
			return false;
		int i = 3;
		while(i <= Math.sqrt(x)){
			if(x % i == 0)
				return false;
			i += 2;
		}
		return true;
	}
}