import java.util.Scanner;
import java.util.Arrays;

class Main {
  private static final int maxNum = 100000010;
  public static void main(String[] args) {
    Scanner cin = new Scanner(System.in);
    boolean[] primeTable = new boolean[maxNum];
    creatPrimeTable(primeTable);

    int n = cin.nextInt(), ct = 0;
    for (int i = 0; i < n; i++){
      int num = cin.nextInt();
      if (primeTable[num]) ct++;
    }

    System.out.println(ct);
  }

  private static void creatPrimeTable(boolean[] table) {
    Arrays.fill(table, true);
    double sqrt_max = Math.sqrt(maxNum);
    for (int i = 2; i < sqrt_max; i++){
      if (table[i]){
        for (int j = i * 2; j < maxNum; j += i){
          table[j] = false;
        }
      }
    }
  }
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util class Main {
  private static final int maxNum = 100000010;
  public static void main(String[] args) {
    Scanner cin = new Scanner(System.in);
    boolean[] primeTable = new boolean[maxNum];
    creatPrimeTable(primeTable);

    int n = cin.nextInt(), ct = 0;
    for (int i = 0; i < n; i++){
      int num = cin.nextInt();
      if (primeTable[num]) ct++;
    }

    System.out.println(ct);
  }

  private static void creatPrimeTable(boolean[] table) {
    Arrays.fill(table, true);
    double sqrt_max = Math.sqrt(maxNum);
    for (int i = 2; i < sqrt_max; i++){
      if (table[i]){
        for (int j = i * 2; j < maxNum; j += i){
          table[j] = false;
        }
      }
    }
  }
} Main private static final int maxNum = 100000010; maxNum 100000010 public static void main(String[] args) {
    Scanner cin = new Scanner(System.in);
    boolean[] primeTable = new boolean[maxNum];
    creatPrimeTable(primeTable);

    int n = cin.nextInt(), ct = 0;
    for (int i = 0; i < n; i++){
      int num = cin.nextInt();
      if (primeTable[num]) ct++;
    }

    System.out.println(ct);
  } main {
    Scanner cin = new Scanner(System.in);
    boolean[] primeTable = new boolean[maxNum];
    creatPrimeTable(primeTable);

    int n = cin.nextInt(), ct = 0;
    for (int i = 0; i < n; i++){
      int num = cin.nextInt();
      if (primeTable[num]) ct++;
    }

    System.out.println(ct);
  } Scanner cin = new Scanner(System.in); cin new Scanner(System.in) boolean[] primeTable = new boolean[maxNum]; primeTable new boolean[maxNum] maxNum creatPrimeTable(primeTable) creatPrimeTable primeTable int n = cin.nextInt() n cin.nextInt() cin.nextInt cin ct = 0; ct 0 for (int i = 0; i < n; i++){
      int num = cin.nextInt();
      if (primeTable[num]) ct++;
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      int num = cin.nextInt();
      if (primeTable[num]) ct++;
    } {
      int num = cin.nextInt();
      if (primeTable[num]) ct++;
    } int num = cin.nextInt(); num cin.nextInt() cin.nextInt cin if (primeTable[num]) ct++; primeTable[num] primeTable num ct++ ct System.out.println(ct) System.out.println System.out System System.out ct String[] args args private static void creatPrimeTable(boolean[] table) {
    Arrays.fill(table, true);
    double sqrt_max = Math.sqrt(maxNum);
    for (int i = 2; i < sqrt_max; i++){
      if (table[i]){
        for (int j = i * 2; j < maxNum; j += i){
          table[j] = false;
        }
      }
    }
  } creatPrimeTable {
    Arrays.fill(table, true);
    double sqrt_max = Math.sqrt(maxNum);
    for (int i = 2; i < sqrt_max; i++){
      if (table[i]){
        for (int j = i * 2; j < maxNum; j += i){
          table[j] = false;
        }
      }
    }
  } Arrays.fill(table, true) Arrays.fill Arrays table true double sqrt_max = Math.sqrt(maxNum); sqrt_max Math.sqrt(maxNum) Math.sqrt Math maxNum for (int i = 2; i < sqrt_max; i++){
      if (table[i]){
        for (int j = i * 2; j < maxNum; j += i){
          table[j] = false;
        }
      }
    } int i = 2; int i = 2; i 2 i < sqrt_max i sqrt_max i++ i++ i {
      if (table[i]){
        for (int j = i * 2; j < maxNum; j += i){
          table[j] = false;
        }
      }
    } {
      if (table[i]){
        for (int j = i * 2; j < maxNum; j += i){
          table[j] = false;
        }
      }
    } if (table[i]){
        for (int j = i * 2; j < maxNum; j += i){
          table[j] = false;
        }
      } table[i] table i {
        for (int j = i * 2; j < maxNum; j += i){
          table[j] = false;
        }
      } for (int j = i * 2; j < maxNum; j += i){
          table[j] = false;
        } int j = i * 2; int j = i * 2; j i * 2 i 2 j < maxNum j maxNum j += i j += i j i {
          table[j] = false;
        } {
          table[j] = false;
        } table[j] = false table[j] table j false boolean[] table table
import java.util.Scanner;
import java.util.Arrays;

class Main {
  private static final int maxNum = 100000010;
  public static void main(String[] args) {
    Scanner cin = new Scanner(System.in);
    boolean[] primeTable = new boolean[maxNum];
    creatPrimeTable(primeTable);

    int n = cin.nextInt(), ct = 0;
    for (int i = 0; i < n; i++){
      int num = cin.nextInt();
      if (primeTable[num]) ct++;
    }

    System.out.println(ct);
  }

  private static void creatPrimeTable(boolean[] table) {
    Arrays.fill(table, true);
    double sqrt_max = Math.sqrt(maxNum);
    for (int i = 2; i < sqrt_max; i++){
      if (table[i]){
        for (int j = i * 2; j < maxNum; j += i){
          table[j] = false;
        }
      }
    }
  }
}