import java.util.Scanner;

public class Main {

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

    private 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 public class Main {

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

    private 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 sc = new Scanner(System.in);
        int n = sc.nextInt();
        int ans = 0;
        for (int i = 0; i < n; i++) {
            if (isPrime(sc.nextInt())) {
                ans++;
            }
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int ans = 0;
        for (int i = 0; i < n; i++) {
            if (isPrime(sc.nextInt())) {
                ans++;
            }
        }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int ans = 0; ans 0 for (int i = 0; i < n; i++) {
            if (isPrime(sc.nextInt())) {
                ans++;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            if (isPrime(sc.nextInt())) {
                ans++;
            }
        } {
            if (isPrime(sc.nextInt())) {
                ans++;
            }
        } if (isPrime(sc.nextInt())) {
                ans++;
            } isPrime(sc.nextInt()) isPrime sc.nextInt() sc.nextInt sc {
                ans++;
            } ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args private 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 public class Main {

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

    private 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;
    }

} public class Main {

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

    private 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
import java.util.Scanner;

public class Main {

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

    private 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;
    }

}

