import java.io.*;

class Main{


public static void main(String[] args) throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(br.readLine());
    int answer = 0;
    for(int i = 0;i < n; i++){
        int number = Integer.parseInt(br.readLine());
        if(isPrime(number)) answer++;
    }
    System.out.println(answer);
    }

private static boolean isPrime(int numb){
    if(numb == 2 || numb == 3 || numb == 5 || numb == 7) {
	    return true;
	    }
    if(numb % 2 == 0) {
	    return false;
	    }
    for(int j=3;j <= Math.sqrt(numb);j++){
        if(numb % j == 0){ 
            return false;}
    }
    return true;
    }
} import java.io.*; io.* java class Main{


public static void main(String[] args) throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(br.readLine());
    int answer = 0;
    for(int i = 0;i < n; i++){
        int number = Integer.parseInt(br.readLine());
        if(isPrime(number)) answer++;
    }
    System.out.println(answer);
    }

private static boolean isPrime(int numb){
    if(numb == 2 || numb == 3 || numb == 5 || numb == 7) {
	    return true;
	    }
    if(numb % 2 == 0) {
	    return false;
	    }
    for(int j=3;j <= Math.sqrt(numb);j++){
        if(numb % j == 0){ 
            return false;}
    }
    return true;
    }
} Main public static void main(String[] args) throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(br.readLine());
    int answer = 0;
    for(int i = 0;i < n; i++){
        int number = Integer.parseInt(br.readLine());
        if(isPrime(number)) answer++;
    }
    System.out.println(answer);
    } main {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(br.readLine());
    int answer = 0;
    for(int i = 0;i < n; i++){
        int number = Integer.parseInt(br.readLine());
        if(isPrime(number)) answer++;
    }
    System.out.println(answer);
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int answer = 0; answer 0 for(int i = 0;i < n; i++){
        int number = Integer.parseInt(br.readLine());
        if(isPrime(number)) answer++;
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        int number = Integer.parseInt(br.readLine());
        if(isPrime(number)) answer++;
    } {
        int number = Integer.parseInt(br.readLine());
        if(isPrime(number)) answer++;
    } int number = Integer.parseInt(br.readLine()); number Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br if(isPrime(number)) answer++; isPrime(number) isPrime number answer++ answer System.out.println(answer) System.out.println System.out System System.out answer String[] args args private static boolean isPrime(int numb){
    if(numb == 2 || numb == 3 || numb == 5 || numb == 7) {
	    return true;
	    }
    if(numb % 2 == 0) {
	    return false;
	    }
    for(int j=3;j <= Math.sqrt(numb);j++){
        if(numb % j == 0){ 
            return false;}
    }
    return true;
    } isPrime {
    if(numb == 2 || numb == 3 || numb == 5 || numb == 7) {
	    return true;
	    }
    if(numb % 2 == 0) {
	    return false;
	    }
    for(int j=3;j <= Math.sqrt(numb);j++){
        if(numb % j == 0){ 
            return false;}
    }
    return true;
    } if(numb == 2 || numb == 3 || numb == 5 || numb == 7) {
	    return true;
	    } numb == 2 || numb == 3 || numb == 5 || numb == 7 numb == 5 numb == 2 || numb == 3 || numb == 5 || numb == 7 numb == 2 numb 2 numb == 3 numb 3 numb == 5 numb 5 numb == 7 numb 7 {
	    return true;
	    } return true; true if(numb % 2 == 0) {
	    return false;
	    } numb % 2 == 0 numb % 2 numb 2 0 {
	    return false;
	    } return false; false for(int j=3;j <= Math.sqrt(numb);j++){
        if(numb % j == 0){ 
            return false;}
    } int j=3; int j=3; j 3 j <= Math.sqrt(numb) j Math.sqrt(numb) Math.sqrt Math numb j++ j++ j {
        if(numb % j == 0){ 
            return false;}
    } {
        if(numb % j == 0){ 
            return false;}
    } if(numb % j == 0){ 
            return false;} numb % j == 0 numb % j numb j 0 { 
            return false;} return false; false return true; true int numb numb
import java.io.*;

class Main{


public static void main(String[] args) throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(br.readLine());
    int answer = 0;
    for(int i = 0;i < n; i++){
        int number = Integer.parseInt(br.readLine());
        if(isPrime(number)) answer++;
    }
    System.out.println(answer);
    }

private static boolean isPrime(int numb){
    if(numb == 2 || numb == 3 || numb == 5 || numb == 7) {
	    return true;
	    }
    if(numb % 2 == 0) {
	    return false;
	    }
    for(int j=3;j <= Math.sqrt(numb);j++){
        if(numb % j == 0){ 
            return false;}
    }
    return true;
    }
}
