import java.util.*;
 
public class Main {
	
	
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int ans=0;
		int n = sc.nextInt();
		int[] in = new int[n];
		for(int i=0;i<n;i++) in[i] = sc.nextInt();
		for(int t=0;t<n;t++){
			int num = in[t];
			if(num==1) continue;
			boolean f = true;
			for(int i=2;i*i<=num;i++){
				if(num%i==0){
					f = false;
					break;
				}
			}
			
			if(f) ans++;
		}
		cout(ans);
	}
	
	public static boolean isPrime(int n){
		for(int i=2;i<=n*n;i++){
			if(n%i==0) return true;
		}
		return false;
	}
	
	public static int gcd(int a,int b){
		if(a%b==0) return b;
		else return gcd(b,a%b);
	}
	
	public static void showary(int[] ary){
		for(int i=0;i<ary.length-1;i++){
			System.out.print(ary[i]+" ");
		}
		cout(ary[ary.length-1]);
	}
	
	public static void cout(String n){
		System.out.println(n);
	}
	
	public static void cout(int n){
		System.out.println(n);
	}
	public static void cout(boolean n){
		if(n==true){
			cout("true");
		}else{
			cout("false");
		}
	}
} import java.util.*; util.* java public class Main {
	
	
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int ans=0;
		int n = sc.nextInt();
		int[] in = new int[n];
		for(int i=0;i<n;i++) in[i] = sc.nextInt();
		for(int t=0;t<n;t++){
			int num = in[t];
			if(num==1) continue;
			boolean f = true;
			for(int i=2;i*i<=num;i++){
				if(num%i==0){
					f = false;
					break;
				}
			}
			
			if(f) ans++;
		}
		cout(ans);
	}
	
	public static boolean isPrime(int n){
		for(int i=2;i<=n*n;i++){
			if(n%i==0) return true;
		}
		return false;
	}
	
	public static int gcd(int a,int b){
		if(a%b==0) return b;
		else return gcd(b,a%b);
	}
	
	public static void showary(int[] ary){
		for(int i=0;i<ary.length-1;i++){
			System.out.print(ary[i]+" ");
		}
		cout(ary[ary.length-1]);
	}
	
	public static void cout(String n){
		System.out.println(n);
	}
	
	public static void cout(int n){
		System.out.println(n);
	}
	public static void cout(boolean n){
		if(n==true){
			cout("true");
		}else{
			cout("false");
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int ans=0;
		int n = sc.nextInt();
		int[] in = new int[n];
		for(int i=0;i<n;i++) in[i] = sc.nextInt();
		for(int t=0;t<n;t++){
			int num = in[t];
			if(num==1) continue;
			boolean f = true;
			for(int i=2;i*i<=num;i++){
				if(num%i==0){
					f = false;
					break;
				}
			}
			
			if(f) ans++;
		}
		cout(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		int ans=0;
		int n = sc.nextInt();
		int[] in = new int[n];
		for(int i=0;i<n;i++) in[i] = sc.nextInt();
		for(int t=0;t<n;t++){
			int num = in[t];
			if(num==1) continue;
			boolean f = true;
			for(int i=2;i*i<=num;i++){
				if(num%i==0){
					f = false;
					break;
				}
			}
			
			if(f) ans++;
		}
		cout(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int ans=0; ans 0 int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] in = new int[n]; in new int[n] n for(int i=0;i<n;i++) in[i] = sc.nextInt(); int i=0; int i=0; i 0 i<n i n i++ i++ i in[i] = sc.nextInt(); in[i] = sc.nextInt() in[i] in i sc.nextInt() sc.nextInt sc for(int t=0;t<n;t++){
			int num = in[t];
			if(num==1) continue;
			boolean f = true;
			for(int i=2;i*i<=num;i++){
				if(num%i==0){
					f = false;
					break;
				}
			}
			
			if(f) ans++;
		} int t=0; int t=0; t 0 t<n t n t++ t++ t {
			int num = in[t];
			if(num==1) continue;
			boolean f = true;
			for(int i=2;i*i<=num;i++){
				if(num%i==0){
					f = false;
					break;
				}
			}
			
			if(f) ans++;
		} {
			int num = in[t];
			if(num==1) continue;
			boolean f = true;
			for(int i=2;i*i<=num;i++){
				if(num%i==0){
					f = false;
					break;
				}
			}
			
			if(f) ans++;
		} int num = in[t]; num in[t] in t if(num==1) continue; num==1 num 1 continue; boolean f = true; f true for(int i=2;i*i<=num;i++){
				if(num%i==0){
					f = false;
					break;
				}
			} int i=2; int i=2; i 2 i*i<=num i*i i i num i++ i++ i {
				if(num%i==0){
					f = false;
					break;
				}
			} {
				if(num%i==0){
					f = false;
					break;
				}
			} if(num%i==0){
					f = false;
					break;
				} num%i==0 num%i num i 0 {
					f = false;
					break;
				} f = false f false break; if(f) ans++; f ans++ ans cout(ans) cout ans String[] args args public static boolean isPrime(int n){
		for(int i=2;i<=n*n;i++){
			if(n%i==0) return true;
		}
		return false;
	} isPrime {
		for(int i=2;i<=n*n;i++){
			if(n%i==0) return true;
		}
		return false;
	} for(int i=2;i<=n*n;i++){
			if(n%i==0) return true;
		} int i=2; int i=2; i 2 i<=n*n i n*n n n i++ i++ i {
			if(n%i==0) return true;
		} {
			if(n%i==0) return true;
		} if(n%i==0) return true; n%i==0 n%i n i 0 return true; true return false; false int n n public static int gcd(int a,int b){
		if(a%b==0) return b;
		else return gcd(b,a%b);
	} gcd {
		if(a%b==0) return b;
		else return gcd(b,a%b);
	} if(a%b==0) return b;
		else return gcd(b,a%b); a%b==0 a%b a b 0 return b; b return gcd(b,a%b); gcd(b,a%b) gcd b a%b a b int a a int b b public static void showary(int[] ary){
		for(int i=0;i<ary.length-1;i++){
			System.out.print(ary[i]+" ");
		}
		cout(ary[ary.length-1]);
	} showary {
		for(int i=0;i<ary.length-1;i++){
			System.out.print(ary[i]+" ");
		}
		cout(ary[ary.length-1]);
	} for(int i=0;i<ary.length-1;i++){
			System.out.print(ary[i]+" ");
		} int i=0; int i=0; i 0 i<ary.length-1 i ary.length-1 ary.length ary ary.length 1 i++ i++ i {
			System.out.print(ary[i]+" ");
		} {
			System.out.print(ary[i]+" ");
		} System.out.print(ary[i]+" ") System.out.print System.out System System.out ary[i]+" " ary[i] ary i " " cout(ary[ary.length-1]) cout ary[ary.length-1] ary ary.length-1 ary.length ary ary.length 1 int[] ary ary public static void cout(String n){
		System.out.println(n);
	} cout {
		System.out.println(n);
	} System.out.println(n) System.out.println System.out System System.out n String n n public static void cout(int n){
		System.out.println(n);
	} cout {
		System.out.println(n);
	} System.out.println(n) System.out.println System.out System System.out n int n n public static void cout(boolean n){
		if(n==true){
			cout("true");
		}else{
			cout("false");
		}
	} cout {
		if(n==true){
			cout("true");
		}else{
			cout("false");
		}
	} if(n==true){
			cout("true");
		}else{
			cout("false");
		} n==true n true {
			cout("true");
		} cout("true") cout "true" {
			cout("false");
		} cout("false") cout "false" boolean n n public class Main {
	
	
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int ans=0;
		int n = sc.nextInt();
		int[] in = new int[n];
		for(int i=0;i<n;i++) in[i] = sc.nextInt();
		for(int t=0;t<n;t++){
			int num = in[t];
			if(num==1) continue;
			boolean f = true;
			for(int i=2;i*i<=num;i++){
				if(num%i==0){
					f = false;
					break;
				}
			}
			
			if(f) ans++;
		}
		cout(ans);
	}
	
	public static boolean isPrime(int n){
		for(int i=2;i<=n*n;i++){
			if(n%i==0) return true;
		}
		return false;
	}
	
	public static int gcd(int a,int b){
		if(a%b==0) return b;
		else return gcd(b,a%b);
	}
	
	public static void showary(int[] ary){
		for(int i=0;i<ary.length-1;i++){
			System.out.print(ary[i]+" ");
		}
		cout(ary[ary.length-1]);
	}
	
	public static void cout(String n){
		System.out.println(n);
	}
	
	public static void cout(int n){
		System.out.println(n);
	}
	public static void cout(boolean n){
		if(n==true){
			cout("true");
		}else{
			cout("false");
		}
	}
} public class Main {
	
	
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int ans=0;
		int n = sc.nextInt();
		int[] in = new int[n];
		for(int i=0;i<n;i++) in[i] = sc.nextInt();
		for(int t=0;t<n;t++){
			int num = in[t];
			if(num==1) continue;
			boolean f = true;
			for(int i=2;i*i<=num;i++){
				if(num%i==0){
					f = false;
					break;
				}
			}
			
			if(f) ans++;
		}
		cout(ans);
	}
	
	public static boolean isPrime(int n){
		for(int i=2;i<=n*n;i++){
			if(n%i==0) return true;
		}
		return false;
	}
	
	public static int gcd(int a,int b){
		if(a%b==0) return b;
		else return gcd(b,a%b);
	}
	
	public static void showary(int[] ary){
		for(int i=0;i<ary.length-1;i++){
			System.out.print(ary[i]+" ");
		}
		cout(ary[ary.length-1]);
	}
	
	public static void cout(String n){
		System.out.println(n);
	}
	
	public static void cout(int n){
		System.out.println(n);
	}
	public static void cout(boolean n){
		if(n==true){
			cout("true");
		}else{
			cout("false");
		}
	}
} Main
import java.util.*;
 
public class Main {
	
	
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int ans=0;
		int n = sc.nextInt();
		int[] in = new int[n];
		for(int i=0;i<n;i++) in[i] = sc.nextInt();
		for(int t=0;t<n;t++){
			int num = in[t];
			if(num==1) continue;
			boolean f = true;
			for(int i=2;i*i<=num;i++){
				if(num%i==0){
					f = false;
					break;
				}
			}
			
			if(f) ans++;
		}
		cout(ans);
	}
	
	public static boolean isPrime(int n){
		for(int i=2;i<=n*n;i++){
			if(n%i==0) return true;
		}
		return false;
	}
	
	public static int gcd(int a,int b){
		if(a%b==0) return b;
		else return gcd(b,a%b);
	}
	
	public static void showary(int[] ary){
		for(int i=0;i<ary.length-1;i++){
			System.out.print(ary[i]+" ");
		}
		cout(ary[ary.length-1]);
	}
	
	public static void cout(String n){
		System.out.println(n);
	}
	
	public static void cout(int n){
		System.out.println(n);
	}
	public static void cout(boolean n){
		if(n==true){
			cout("true");
		}else{
			cout("false");
		}
	}
}