import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner sc= new Scanner(System.in);
		int count=0;
		int n=sc.nextInt();
		for(int i=0;i<n;i++){
			int state=0;
			int a=sc.nextInt();
			for(int j=2;j<=Math.sqrt(a);j++){
				if(a%j==0){
					state=1;
					break;
				}
			}
			if(state==0){
				//System.out.println(a);
				count++;
			}
		}
		System.out.println(count);
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
		Scanner sc= new Scanner(System.in);
		int count=0;
		int n=sc.nextInt();
		for(int i=0;i<n;i++){
			int state=0;
			int a=sc.nextInt();
			for(int j=2;j<=Math.sqrt(a);j++){
				if(a%j==0){
					state=1;
					break;
				}
			}
			if(state==0){
				//System.out.println(a);
				count++;
			}
		}
		System.out.println(count);
	}
} Main public static void main(String[] args){
		Scanner sc= new Scanner(System.in);
		int count=0;
		int n=sc.nextInt();
		for(int i=0;i<n;i++){
			int state=0;
			int a=sc.nextInt();
			for(int j=2;j<=Math.sqrt(a);j++){
				if(a%j==0){
					state=1;
					break;
				}
			}
			if(state==0){
				//System.out.println(a);
				count++;
			}
		}
		System.out.println(count);
	} main {
		Scanner sc= new Scanner(System.in);
		int count=0;
		int n=sc.nextInt();
		for(int i=0;i<n;i++){
			int state=0;
			int a=sc.nextInt();
			for(int j=2;j<=Math.sqrt(a);j++){
				if(a%j==0){
					state=1;
					break;
				}
			}
			if(state==0){
				//System.out.println(a);
				count++;
			}
		}
		System.out.println(count);
	} Scanner sc= new Scanner(System.in); sc new Scanner(System.in) int count=0; count 0 int n=sc.nextInt(); n sc.nextInt() sc.nextInt sc for(int i=0;i<n;i++){
			int state=0;
			int a=sc.nextInt();
			for(int j=2;j<=Math.sqrt(a);j++){
				if(a%j==0){
					state=1;
					break;
				}
			}
			if(state==0){
				//System.out.println(a);
				count++;
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			int state=0;
			int a=sc.nextInt();
			for(int j=2;j<=Math.sqrt(a);j++){
				if(a%j==0){
					state=1;
					break;
				}
			}
			if(state==0){
				//System.out.println(a);
				count++;
			}
		} {
			int state=0;
			int a=sc.nextInt();
			for(int j=2;j<=Math.sqrt(a);j++){
				if(a%j==0){
					state=1;
					break;
				}
			}
			if(state==0){
				//System.out.println(a);
				count++;
			}
		} int state=0; state 0 int a=sc.nextInt(); a sc.nextInt() sc.nextInt sc for(int j=2;j<=Math.sqrt(a);j++){
				if(a%j==0){
					state=1;
					break;
				}
			} int j=2; int j=2; j 2 j<=Math.sqrt(a) j Math.sqrt(a) Math.sqrt Math a j++ j++ j {
				if(a%j==0){
					state=1;
					break;
				}
			} {
				if(a%j==0){
					state=1;
					break;
				}
			} if(a%j==0){
					state=1;
					break;
				} a%j==0 a%j a j 0 {
					state=1;
					break;
				} state=1 state 1 break; if(state==0){
				//System.out.println(a);
				count++;
			} state==0 state 0 {
				//System.out.println(a);
				count++;
			} count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main{
	public static void main(String[] args){
		Scanner sc= new Scanner(System.in);
		int count=0;
		int n=sc.nextInt();
		for(int i=0;i<n;i++){
			int state=0;
			int a=sc.nextInt();
			for(int j=2;j<=Math.sqrt(a);j++){
				if(a%j==0){
					state=1;
					break;
				}
			}
			if(state==0){
				//System.out.println(a);
				count++;
			}
		}
		System.out.println(count);
	}
} public class Main{
	public static void main(String[] args){
		Scanner sc= new Scanner(System.in);
		int count=0;
		int n=sc.nextInt();
		for(int i=0;i<n;i++){
			int state=0;
			int a=sc.nextInt();
			for(int j=2;j<=Math.sqrt(a);j++){
				if(a%j==0){
					state=1;
					break;
				}
			}
			if(state==0){
				//System.out.println(a);
				count++;
			}
		}
		System.out.println(count);
	}
} Main
import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner sc= new Scanner(System.in);
		int count=0;
		int n=sc.nextInt();
		for(int i=0;i<n;i++){
			int state=0;
			int a=sc.nextInt();
			for(int j=2;j<=Math.sqrt(a);j++){
				if(a%j==0){
					state=1;
					break;
				}
			}
			if(state==0){
				//System.out.println(a);
				count++;
			}
		}
		System.out.println(count);
	}
}