import java.util.*;

public class Main{
	final int MOD = 1000000007;
	final int INF = 1000000000;
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int cnt = 0;
		for(int i = 0; i < n; ++i){
			int a = Integer.parseInt(sc.next());
			if(isPrime(a)) ++cnt;
		}
		sc.close();
		System.out.println(cnt);
	}
	
	public static boolean isPrime(int x){
		if(x < 2) return false;
	    if(x == 2) return true;
	    if(x % 2 == 0) return false;
	    for(int i = 3; i * i <= x; i += 2)
	        if(x % i == 0) return false;
	    return true;
	}
	
}
 import java.util.*; util.* java public class Main{
	final int MOD = 1000000007;
	final int INF = 1000000000;
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int cnt = 0;
		for(int i = 0; i < n; ++i){
			int a = Integer.parseInt(sc.next());
			if(isPrime(a)) ++cnt;
		}
		sc.close();
		System.out.println(cnt);
	}
	
	public static boolean isPrime(int x){
		if(x < 2) return false;
	    if(x == 2) return true;
	    if(x % 2 == 0) return false;
	    for(int i = 3; i * i <= x; i += 2)
	        if(x % i == 0) return false;
	    return true;
	}
	
} Main final int MOD = 1000000007; MOD 1000000007 final int INF = 1000000000; INF 1000000000 public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int cnt = 0;
		for(int i = 0; i < n; ++i){
			int a = Integer.parseInt(sc.next());
			if(isPrime(a)) ++cnt;
		}
		sc.close();
		System.out.println(cnt);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int cnt = 0;
		for(int i = 0; i < n; ++i){
			int a = Integer.parseInt(sc.next());
			if(isPrime(a)) ++cnt;
		}
		sc.close();
		System.out.println(cnt);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int cnt = 0; cnt 0 for(int i = 0; i < n; ++i){
			int a = Integer.parseInt(sc.next());
			if(isPrime(a)) ++cnt;
		} int i = 0; int i = 0; i 0 i < n i n ++i ++i i {
			int a = Integer.parseInt(sc.next());
			if(isPrime(a)) ++cnt;
		} {
			int a = Integer.parseInt(sc.next());
			if(isPrime(a)) ++cnt;
		} int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc if(isPrime(a)) ++cnt; isPrime(a) isPrime a ++cnt cnt sc.close() sc.close sc System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public static boolean isPrime(int x){
		if(x < 2) return false;
	    if(x == 2) return true;
	    if(x % 2 == 0) return false;
	    for(int i = 3; i * i <= x; i += 2)
	        if(x % i == 0) return false;
	    return true;
	} isPrime {
		if(x < 2) return false;
	    if(x == 2) return true;
	    if(x % 2 == 0) return false;
	    for(int i = 3; i * i <= x; i += 2)
	        if(x % i == 0) return false;
	    return true;
	} if(x < 2) return false; x < 2 x 2 return false; false if(x == 2) return true; x == 2 x 2 return true; true if(x % 2 == 0) return false; x % 2 == 0 x % 2 x 2 0 return false; false for(int i = 3; i * i <= x; i += 2)
	        if(x % i == 0) return false; int i = 3; int i = 3; i 3 i * i <= x i * i i i x i += 2 i += 2 i 2 if(x % i == 0) return false; if(x % i == 0) return false; x % i == 0 x % i x i 0 return false; false return true; true int x x public class Main{
	final int MOD = 1000000007;
	final int INF = 1000000000;
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int cnt = 0;
		for(int i = 0; i < n; ++i){
			int a = Integer.parseInt(sc.next());
			if(isPrime(a)) ++cnt;
		}
		sc.close();
		System.out.println(cnt);
	}
	
	public static boolean isPrime(int x){
		if(x < 2) return false;
	    if(x == 2) return true;
	    if(x % 2 == 0) return false;
	    for(int i = 3; i * i <= x; i += 2)
	        if(x % i == 0) return false;
	    return true;
	}
	
} public class Main{
	final int MOD = 1000000007;
	final int INF = 1000000000;
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int cnt = 0;
		for(int i = 0; i < n; ++i){
			int a = Integer.parseInt(sc.next());
			if(isPrime(a)) ++cnt;
		}
		sc.close();
		System.out.println(cnt);
	}
	
	public static boolean isPrime(int x){
		if(x < 2) return false;
	    if(x == 2) return true;
	    if(x % 2 == 0) return false;
	    for(int i = 3; i * i <= x; i += 2)
	        if(x % i == 0) return false;
	    return true;
	}
	
} Main
import java.util.*;

public class Main{
	final int MOD = 1000000007;
	final int INF = 1000000000;
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int cnt = 0;
		for(int i = 0; i < n; ++i){
			int a = Integer.parseInt(sc.next());
			if(isPrime(a)) ++cnt;
		}
		sc.close();
		System.out.println(cnt);
	}
	
	public static boolean isPrime(int x){
		if(x < 2) return false;
	    if(x == 2) return true;
	    if(x % 2 == 0) return false;
	    for(int i = 3; i * i <= x; i += 2)
	        if(x % i == 0) return false;
	    return true;
	}
	
}

