import java.util.Scanner;

class Main{
    static public void main(String[] av){
	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	int cnt = 0;
	for(int i=0; i<n; i++){
	    int x = sc.nextInt();
	    int flag = 0;
	    int y = (int)Math.sqrt(x);
	    for(int j=2; j<=y; j++){
		if(x%j == 0){
		    flag = 1;
		}
	    }
	    if(flag == 0){
		cnt++;
	    }
	}
	System.out.println(cnt);
    }
} import java.util.Scanner; Scanner java.util class Main{
    static public void main(String[] av){
	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	int cnt = 0;
	for(int i=0; i<n; i++){
	    int x = sc.nextInt();
	    int flag = 0;
	    int y = (int)Math.sqrt(x);
	    for(int j=2; j<=y; j++){
		if(x%j == 0){
		    flag = 1;
		}
	    }
	    if(flag == 0){
		cnt++;
	    }
	}
	System.out.println(cnt);
    }
} Main static public void main(String[] av){
	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	int cnt = 0;
	for(int i=0; i<n; i++){
	    int x = sc.nextInt();
	    int flag = 0;
	    int y = (int)Math.sqrt(x);
	    for(int j=2; j<=y; j++){
		if(x%j == 0){
		    flag = 1;
		}
	    }
	    if(flag == 0){
		cnt++;
	    }
	}
	System.out.println(cnt);
    } main {
	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	int cnt = 0;
	for(int i=0; i<n; i++){
	    int x = sc.nextInt();
	    int flag = 0;
	    int y = (int)Math.sqrt(x);
	    for(int j=2; j<=y; j++){
		if(x%j == 0){
		    flag = 1;
		}
	    }
	    if(flag == 0){
		cnt++;
	    }
	}
	System.out.println(cnt);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int cnt = 0; cnt 0 for(int i=0; i<n; i++){
	    int x = sc.nextInt();
	    int flag = 0;
	    int y = (int)Math.sqrt(x);
	    for(int j=2; j<=y; j++){
		if(x%j == 0){
		    flag = 1;
		}
	    }
	    if(flag == 0){
		cnt++;
	    }
	} int i=0; int i=0; i 0 i<n i n i++ i++ i {
	    int x = sc.nextInt();
	    int flag = 0;
	    int y = (int)Math.sqrt(x);
	    for(int j=2; j<=y; j++){
		if(x%j == 0){
		    flag = 1;
		}
	    }
	    if(flag == 0){
		cnt++;
	    }
	} {
	    int x = sc.nextInt();
	    int flag = 0;
	    int y = (int)Math.sqrt(x);
	    for(int j=2; j<=y; j++){
		if(x%j == 0){
		    flag = 1;
		}
	    }
	    if(flag == 0){
		cnt++;
	    }
	} int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc int flag = 0; flag 0 int y = (int)Math.sqrt(x); y (int)Math.sqrt(x) Math.sqrt Math x for(int j=2; j<=y; j++){
		if(x%j == 0){
		    flag = 1;
		}
	    } int j=2; int j=2; j 2 j<=y j y j++ j++ j {
		if(x%j == 0){
		    flag = 1;
		}
	    } {
		if(x%j == 0){
		    flag = 1;
		}
	    } if(x%j == 0){
		    flag = 1;
		} x%j == 0 x%j x j 0 {
		    flag = 1;
		} flag = 1 flag 1 if(flag == 0){
		cnt++;
	    } flag == 0 flag 0 {
		cnt++;
	    } cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt String[] av av
import java.util.Scanner;

class Main{
    static public void main(String[] av){
	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	int cnt = 0;
	for(int i=0; i<n; i++){
	    int x = sc.nextInt();
	    int flag = 0;
	    int y = (int)Math.sqrt(x);
	    for(int j=2; j<=y; j++){
		if(x%j == 0){
		    flag = 1;
		}
	    }
	    if(flag == 0){
		cnt++;
	    }
	}
	System.out.println(cnt);
    }
}
