import java.util.Scanner;

class Main{
  public static void main(String args[]){
    Scanner scan = new Scanner(System.in);

    int a = scan.nextInt();
    int[] getNum = new int[a];
    int count = 0; //素数の個数

    //標準入力を配列に格納
    for(int i = 0; i < getNum.length; i++) {
    getNum[i] = scan.nextInt();
    }
    for(int i = 0; i < getNum.length; i++) {
    if(isPrime(getNum[i]) == true) {
    	count++;
    }
    }
    System.out.println(count);
  }
    public static boolean isPrime(int num) {
  //素数の判別
    if(num < 2) {
    	return false;
    }
    else if(num == 2) {
    	return true;
    }
    else if(num % 2 == 0) {
    	return false;
    }

    double sqrtNum = Math.sqrt(num);
    for(int i = 3; i <= sqrtNum; i+= 2) {
    	if(num % i == 0) {
    		return false;
    	}
    }
    return true;
  }
} import java.util.Scanner; Scanner java.util class Main{
  public static void main(String args[]){
    Scanner scan = new Scanner(System.in);

    int a = scan.nextInt();
    int[] getNum = new int[a];
    int count = 0; //素数の個数

    //標準入力を配列に格納
    for(int i = 0; i < getNum.length; i++) {
    getNum[i] = scan.nextInt();
    }
    for(int i = 0; i < getNum.length; i++) {
    if(isPrime(getNum[i]) == true) {
    	count++;
    }
    }
    System.out.println(count);
  }
    public static boolean isPrime(int num) {
  //素数の判別
    if(num < 2) {
    	return false;
    }
    else if(num == 2) {
    	return true;
    }
    else if(num % 2 == 0) {
    	return false;
    }

    double sqrtNum = Math.sqrt(num);
    for(int i = 3; i <= sqrtNum; i+= 2) {
    	if(num % i == 0) {
    		return false;
    	}
    }
    return true;
  }
} Main public static void main(String args[]){
    Scanner scan = new Scanner(System.in);

    int a = scan.nextInt();
    int[] getNum = new int[a];
    int count = 0; //素数の個数

    //標準入力を配列に格納
    for(int i = 0; i < getNum.length; i++) {
    getNum[i] = scan.nextInt();
    }
    for(int i = 0; i < getNum.length; i++) {
    if(isPrime(getNum[i]) == true) {
    	count++;
    }
    }
    System.out.println(count);
  } main {
    Scanner scan = new Scanner(System.in);

    int a = scan.nextInt();
    int[] getNum = new int[a];
    int count = 0; //素数の個数

    //標準入力を配列に格納
    for(int i = 0; i < getNum.length; i++) {
    getNum[i] = scan.nextInt();
    }
    for(int i = 0; i < getNum.length; i++) {
    if(isPrime(getNum[i]) == true) {
    	count++;
    }
    }
    System.out.println(count);
  } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan int[] getNum = new int[a]; getNum new int[a] a int count = 0; count 0 for(int i = 0; i < getNum.length; i++) {
    getNum[i] = scan.nextInt();
    } int i = 0; int i = 0; i 0 i < getNum.length i getNum.length getNum getNum.length i++ i++ i {
    getNum[i] = scan.nextInt();
    } {
    getNum[i] = scan.nextInt();
    } getNum[i] = scan.nextInt() getNum[i] getNum i scan.nextInt() scan.nextInt scan for(int i = 0; i < getNum.length; i++) {
    if(isPrime(getNum[i]) == true) {
    	count++;
    }
    } int i = 0; int i = 0; i 0 i < getNum.length i getNum.length getNum getNum.length i++ i++ i {
    if(isPrime(getNum[i]) == true) {
    	count++;
    }
    } {
    if(isPrime(getNum[i]) == true) {
    	count++;
    }
    } if(isPrime(getNum[i]) == true) {
    	count++;
    } isPrime(getNum[i]) == true isPrime(getNum[i]) isPrime getNum[i] getNum i true {
    	count++;
    } count++ count System.out.println(count) System.out.println System.out System System.out count String args[] args public static boolean isPrime(int num) {
  //素数の判別
    if(num < 2) {
    	return false;
    }
    else if(num == 2) {
    	return true;
    }
    else if(num % 2 == 0) {
    	return false;
    }

    double sqrtNum = Math.sqrt(num);
    for(int i = 3; i <= sqrtNum; i+= 2) {
    	if(num % i == 0) {
    		return false;
    	}
    }
    return true;
  } isPrime {
  //素数の判別
    if(num < 2) {
    	return false;
    }
    else if(num == 2) {
    	return true;
    }
    else if(num % 2 == 0) {
    	return false;
    }

    double sqrtNum = Math.sqrt(num);
    for(int i = 3; i <= sqrtNum; i+= 2) {
    	if(num % i == 0) {
    		return false;
    	}
    }
    return true;
  } if(num < 2) {
    	return false;
    }
    else if(num == 2) {
    	return true;
    }
    else if(num % 2 == 0) {
    	return false;
    } num < 2 num 2 {
    	return false;
    } return false; false if(num == 2) {
    	return true;
    }
    else if(num % 2 == 0) {
    	return false;
    } num == 2 num 2 {
    	return true;
    } return true; true if(num % 2 == 0) {
    	return false;
    } num % 2 == 0 num % 2 num 2 0 {
    	return false;
    } return false; false double sqrtNum = Math.sqrt(num); sqrtNum Math.sqrt(num) Math.sqrt Math num for(int i = 3; i <= sqrtNum; i+= 2) {
    	if(num % i == 0) {
    		return false;
    	}
    } int i = 3; int i = 3; i 3 i <= sqrtNum i sqrtNum i+= 2 i+= 2 i 2 {
    	if(num % i == 0) {
    		return false;
    	}
    } {
    	if(num % i == 0) {
    		return false;
    	}
    } if(num % i == 0) {
    		return false;
    	} num % i == 0 num % i num i 0 {
    		return false;
    	} return false; false return true; true int num num
import java.util.Scanner;

class Main{
  public static void main(String args[]){
    Scanner scan = new Scanner(System.in);

    int a = scan.nextInt();
    int[] getNum = new int[a];
    int count = 0; //素数の個数

    //標準入力を配列に格納
    for(int i = 0; i < getNum.length; i++) {
    getNum[i] = scan.nextInt();
    }
    for(int i = 0; i < getNum.length; i++) {
    if(isPrime(getNum[i]) == true) {
    	count++;
    }
    }
    System.out.println(count);
  }
    public static boolean isPrime(int num) {
  //素数の判別
    if(num < 2) {
    	return false;
    }
    else if(num == 2) {
    	return true;
    }
    else if(num % 2 == 0) {
    	return false;
    }

    double sqrtNum = Math.sqrt(num);
    for(int i = 3; i <= sqrtNum; i+= 2) {
    	if(num % i == 0) {
    		return false;
    	}
    }
    return true;
  }
}
