import java.util.Scanner;
class Main{
    public static void main(String[] args){
	int count=0,i,j,yaku=0,n,m;
	
	Scanner scan = new Scanner(System.in);
	n = scan.nextInt();
	if(1>n || n>10000){System.exit(0);}
	 
	for(i=0;i<n;i++){  
	    m = scan.nextInt();
	    if(2>m || m>100000000){System.exit(0);} 
	    for(j=2;j<=Math.sqrt(m);j++){
		if(m%j==0){
		    yaku++;
		}
	    }
	    if(yaku==0){count++;}
	    yaku=0;
	}
	System.out.println(count);
    }
}
 import java.util.Scanner; Scanner java.util class Main{
    public static void main(String[] args){
	int count=0,i,j,yaku=0,n,m;
	
	Scanner scan = new Scanner(System.in);
	n = scan.nextInt();
	if(1>n || n>10000){System.exit(0);}
	 
	for(i=0;i<n;i++){  
	    m = scan.nextInt();
	    if(2>m || m>100000000){System.exit(0);} 
	    for(j=2;j<=Math.sqrt(m);j++){
		if(m%j==0){
		    yaku++;
		}
	    }
	    if(yaku==0){count++;}
	    yaku=0;
	}
	System.out.println(count);
    }
} Main public static void main(String[] args){
	int count=0,i,j,yaku=0,n,m;
	
	Scanner scan = new Scanner(System.in);
	n = scan.nextInt();
	if(1>n || n>10000){System.exit(0);}
	 
	for(i=0;i<n;i++){  
	    m = scan.nextInt();
	    if(2>m || m>100000000){System.exit(0);} 
	    for(j=2;j<=Math.sqrt(m);j++){
		if(m%j==0){
		    yaku++;
		}
	    }
	    if(yaku==0){count++;}
	    yaku=0;
	}
	System.out.println(count);
    } main {
	int count=0,i,j,yaku=0,n,m;
	
	Scanner scan = new Scanner(System.in);
	n = scan.nextInt();
	if(1>n || n>10000){System.exit(0);}
	 
	for(i=0;i<n;i++){  
	    m = scan.nextInt();
	    if(2>m || m>100000000){System.exit(0);} 
	    for(j=2;j<=Math.sqrt(m);j++){
		if(m%j==0){
		    yaku++;
		}
	    }
	    if(yaku==0){count++;}
	    yaku=0;
	}
	System.out.println(count);
    } int count=0 count 0 i i j j yaku=0 yaku 0 n n m; m Scanner scan = new Scanner(System.in); scan new Scanner(System.in) n = scan.nextInt() n scan.nextInt() scan.nextInt scan if(1>n || n>10000){System.exit(0);} 1>n || n>10000 1>n 1 n n>10000 n 10000 {System.exit(0);} System.exit(0) System.exit System 0 for(i=0;i<n;i++){  
	    m = scan.nextInt();
	    if(2>m || m>100000000){System.exit(0);} 
	    for(j=2;j<=Math.sqrt(m);j++){
		if(m%j==0){
		    yaku++;
		}
	    }
	    if(yaku==0){count++;}
	    yaku=0;
	} i=0; i=0 i 0 i<n i n i++ i++ i {  
	    m = scan.nextInt();
	    if(2>m || m>100000000){System.exit(0);} 
	    for(j=2;j<=Math.sqrt(m);j++){
		if(m%j==0){
		    yaku++;
		}
	    }
	    if(yaku==0){count++;}
	    yaku=0;
	} {  
	    m = scan.nextInt();
	    if(2>m || m>100000000){System.exit(0);} 
	    for(j=2;j<=Math.sqrt(m);j++){
		if(m%j==0){
		    yaku++;
		}
	    }
	    if(yaku==0){count++;}
	    yaku=0;
	} m = scan.nextInt() m scan.nextInt() scan.nextInt scan if(2>m || m>100000000){System.exit(0);} 2>m || m>100000000 2>m 2 m m>100000000 m 100000000 {System.exit(0);} System.exit(0) System.exit System 0 for(j=2;j<=Math.sqrt(m);j++){
		if(m%j==0){
		    yaku++;
		}
	    } j=2; j=2 j 2 j<=Math.sqrt(m) j Math.sqrt(m) Math.sqrt Math m j++ j++ j {
		if(m%j==0){
		    yaku++;
		}
	    } {
		if(m%j==0){
		    yaku++;
		}
	    } if(m%j==0){
		    yaku++;
		} m%j==0 m%j m j 0 {
		    yaku++;
		} yaku++ yaku if(yaku==0){count++;} yaku==0 yaku 0 {count++;} count++ count yaku=0 yaku 0 System.out.println(count) System.out.println System.out System System.out count String[] args args
import java.util.Scanner;
class Main{
    public static void main(String[] args){
	int count=0,i,j,yaku=0,n,m;
	
	Scanner scan = new Scanner(System.in);
	n = scan.nextInt();
	if(1>n || n>10000){System.exit(0);}
	 
	for(i=0;i<n;i++){  
	    m = scan.nextInt();
	    if(2>m || m>100000000){System.exit(0);} 
	    for(j=2;j<=Math.sqrt(m);j++){
		if(m%j==0){
		    yaku++;
		}
	    }
	    if(yaku==0){count++;}
	    yaku=0;
	}
	System.out.println(count);
    }
}

