import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

  public static void main(String[] args) throws IOException {
    
    try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      int n = Integer.parseInt( br.readLine() );
      int num;
      int result = 0;

      for (int i=0; i<n; i++) {
        num = Integer.parseInt(br.readLine());
        if (isPrime(num)) result++;
      }
      System.out.println(result);
    }
  }

  public static boolean isPrime(int num) {
    if( num == 2 ) return true;
    if( (num % 2) == 0 ) return false;

    for(int i=3; i*i <= num; i+=2 ) {
      if ( num % i == 0 ) return false;
    }
    return true;
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

  public static void main(String[] args) throws IOException {
    
    try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      int n = Integer.parseInt( br.readLine() );
      int num;
      int result = 0;

      for (int i=0; i<n; i++) {
        num = Integer.parseInt(br.readLine());
        if (isPrime(num)) result++;
      }
      System.out.println(result);
    }
  }

  public static boolean isPrime(int num) {
    if( num == 2 ) return true;
    if( (num % 2) == 0 ) return false;

    for(int i=3; i*i <= num; i+=2 ) {
      if ( num % i == 0 ) return false;
    }
    return true;
  }
} Main public static void main(String[] args) throws IOException {
    
    try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      int n = Integer.parseInt( br.readLine() );
      int num;
      int result = 0;

      for (int i=0; i<n; i++) {
        num = Integer.parseInt(br.readLine());
        if (isPrime(num)) result++;
      }
      System.out.println(result);
    }
  } main {
    
    try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      int n = Integer.parseInt( br.readLine() );
      int num;
      int result = 0;

      for (int i=0; i<n; i++) {
        num = Integer.parseInt(br.readLine());
        if (isPrime(num)) result++;
      }
      System.out.println(result);
    }
  } try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      int n = Integer.parseInt( br.readLine() );
      int num;
      int result = 0;

      for (int i=0; i<n; i++) {
        num = Integer.parseInt(br.readLine());
        if (isPrime(num)) result++;
      }
      System.out.println(result);
    } {

      int n = Integer.parseInt( br.readLine() );
      int num;
      int result = 0;

      for (int i=0; i<n; i++) {
        num = Integer.parseInt(br.readLine());
        if (isPrime(num)) result++;
      }
      System.out.println(result);
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) 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 num; num int result = 0; result 0 for (int i=0; i<n; i++) {
        num = Integer.parseInt(br.readLine());
        if (isPrime(num)) result++;
      } int i=0; int i=0; i 0 i<n i n i++ i++ i {
        num = Integer.parseInt(br.readLine());
        if (isPrime(num)) result++;
      } {
        num = Integer.parseInt(br.readLine());
        if (isPrime(num)) result++;
      } num = Integer.parseInt(br.readLine()) num Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br if (isPrime(num)) result++; isPrime(num) isPrime num result++ result System.out.println(result) System.out.println System.out System System.out result String[] args args public static boolean isPrime(int num) {
    if( num == 2 ) return true;
    if( (num % 2) == 0 ) return false;

    for(int i=3; i*i <= num; i+=2 ) {
      if ( num % i == 0 ) return false;
    }
    return true;
  } isPrime {
    if( num == 2 ) return true;
    if( (num % 2) == 0 ) return false;

    for(int i=3; i*i <= num; i+=2 ) {
      if ( num % i == 0 ) return false;
    }
    return true;
  } if( num == 2 ) return true; num == 2 num 2 return true; true if( (num % 2) == 0 ) return false; (num % 2) == 0 (num % 2) num 2 0 return false; false for(int i=3; i*i <= num; i+=2 ) {
      if ( num % i == 0 ) return false;
    } int i=3; int i=3; i 3 i*i <= num i*i i i num 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; false return true; true int num num public class Main {

  public static void main(String[] args) throws IOException {
    
    try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      int n = Integer.parseInt( br.readLine() );
      int num;
      int result = 0;

      for (int i=0; i<n; i++) {
        num = Integer.parseInt(br.readLine());
        if (isPrime(num)) result++;
      }
      System.out.println(result);
    }
  }

  public static boolean isPrime(int num) {
    if( num == 2 ) return true;
    if( (num % 2) == 0 ) return false;

    for(int i=3; i*i <= num; i+=2 ) {
      if ( num % i == 0 ) return false;
    }
    return true;
  }
} public class Main {

  public static void main(String[] args) throws IOException {
    
    try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      int n = Integer.parseInt( br.readLine() );
      int num;
      int result = 0;

      for (int i=0; i<n; i++) {
        num = Integer.parseInt(br.readLine());
        if (isPrime(num)) result++;
      }
      System.out.println(result);
    }
  }

  public static boolean isPrime(int num) {
    if( num == 2 ) return true;
    if( (num % 2) == 0 ) return false;

    for(int i=3; i*i <= num; i+=2 ) {
      if ( num % i == 0 ) return false;
    }
    return true;
  }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

  public static void main(String[] args) throws IOException {
    
    try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      int n = Integer.parseInt( br.readLine() );
      int num;
      int result = 0;

      for (int i=0; i<n; i++) {
        num = Integer.parseInt(br.readLine());
        if (isPrime(num)) result++;
      }
      System.out.println(result);
    }
  }

  public static boolean isPrime(int num) {
    if( num == 2 ) return true;
    if( (num % 2) == 0 ) return false;

    for(int i=3; i*i <= num; i+=2 ) {
      if ( num % i == 0 ) return false;
    }
    return true;
  }
}
