import java.util.*;
import java.lang.*;

public class Main {
    static boolean isPrime(int x) {
        for(int i = 2; i <= Math.sqrt(x); i++) {
            if(x % i == 0) return false;
        }
        return true;
    }

    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);
        int n  = sc.nextInt();
        int flag = 0, sum = 0;
        while (flag  < n) {
            if(isPrime(sc.nextInt())) sum++;
            flag++;
        }
        System.out.println(sum);
    }
} import java.util.*; util.* java import java.lang.*; lang.* java public class Main {
    static boolean isPrime(int x) {
        for(int i = 2; i <= Math.sqrt(x); i++) {
            if(x % i == 0) return false;
        }
        return true;
    }

    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);
        int n  = sc.nextInt();
        int flag = 0, sum = 0;
        while (flag  < n) {
            if(isPrime(sc.nextInt())) sum++;
            flag++;
        }
        System.out.println(sum);
    }
} Main static boolean isPrime(int x) {
        for(int i = 2; i <= Math.sqrt(x); i++) {
            if(x % i == 0) return false;
        }
        return true;
    } isPrime {
        for(int i = 2; i <= Math.sqrt(x); i++) {
            if(x % i == 0) return false;
        }
        return true;
    } for(int i = 2; i <= Math.sqrt(x); i++) {
            if(x % i == 0) return false;
        } int i = 2; int i = 2; i 2 i <= Math.sqrt(x) i Math.sqrt(x) Math.sqrt Math x i++ i++ i {
            if(x % i == 0) return false;
        } {
            if(x % i == 0) return false;
        } if(x % i == 0) return false; x % i == 0 x % i x i 0 return false; false return true; true int x x public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);
        int n  = sc.nextInt();
        int flag = 0, sum = 0;
        while (flag  < n) {
            if(isPrime(sc.nextInt())) sum++;
            flag++;
        }
        System.out.println(sum);
    } main {
        Scanner sc = new Scanner(System.in);
        int n  = sc.nextInt();
        int flag = 0, sum = 0;
        while (flag  < n) {
            if(isPrime(sc.nextInt())) sum++;
            flag++;
        }
        System.out.println(sum);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n  = sc.nextInt(); n sc.nextInt() sc.nextInt sc int flag = 0 flag 0 sum = 0; sum 0 while (flag  < n) {
            if(isPrime(sc.nextInt())) sum++;
            flag++;
        } flag  < n flag n {
            if(isPrime(sc.nextInt())) sum++;
            flag++;
        } if(isPrime(sc.nextInt())) sum++; isPrime(sc.nextInt()) isPrime sc.nextInt() sc.nextInt sc sum++ sum flag++ flag System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main {
    static boolean isPrime(int x) {
        for(int i = 2; i <= Math.sqrt(x); i++) {
            if(x % i == 0) return false;
        }
        return true;
    }

    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);
        int n  = sc.nextInt();
        int flag = 0, sum = 0;
        while (flag  < n) {
            if(isPrime(sc.nextInt())) sum++;
            flag++;
        }
        System.out.println(sum);
    }
} public class Main {
    static boolean isPrime(int x) {
        for(int i = 2; i <= Math.sqrt(x); i++) {
            if(x % i == 0) return false;
        }
        return true;
    }

    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);
        int n  = sc.nextInt();
        int flag = 0, sum = 0;
        while (flag  < n) {
            if(isPrime(sc.nextInt())) sum++;
            flag++;
        }
        System.out.println(sum);
    }
} Main
import java.util.*;
import java.lang.*;

public class Main {
    static boolean isPrime(int x) {
        for(int i = 2; i <= Math.sqrt(x); i++) {
            if(x % i == 0) return false;
        }
        return true;
    }

    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);
        int n  = sc.nextInt();
        int flag = 0, sum = 0;
        while (flag  < n) {
            if(isPrime(sc.nextInt())) sum++;
            flag++;
        }
        System.out.println(sum);
    }
}