import java.util.*;

public class Main {
    
    public static void main(String[] args) {
        Main main = new Main();
        main.solv();
    }
    
    private int MAX = 1000000000;
    private int MAXA = (int)Math.sqrt(MAX+1);
    private void solv() {
        Scanner input = new Scanner(System.in);
        
        boolean[] primes = new boolean[MAXA];
        Arrays.fill(primes, true);
        for (int i = 2; i < MAXA; i++) {
            if (primes[i]) {
                for (int j = i * 2; j < MAXA; j += i) {
                    primes[j] = false;
                }
            }
        }
        int[] xs = new int[input.nextInt()];
        for (int i = 0; i < xs.length; i++) {
            xs[i] = input.nextInt();
        }
        int count = 0;
        for (int x : xs) {
            boolean flag = true;
            for (int i = 2; i * i <= x; i++) {
                if (primes[i] && x % i == 0) {
                    flag = false;
                }
            }
            if (flag) {
                count++;
            }
        }
        System.out.println(count);
    }
    
    private void print(int[] xs) {
        StringBuilder sb = new StringBuilder();
        for (int x : xs) sb.append(x).append(' ');
        System.out.println(sb.toString().trim());
    }
} import java.util.*; util.* java public class Main {
    
    public static void main(String[] args) {
        Main main = new Main();
        main.solv();
    }
    
    private int MAX = 1000000000;
    private int MAXA = (int)Math.sqrt(MAX+1);
    private void solv() {
        Scanner input = new Scanner(System.in);
        
        boolean[] primes = new boolean[MAXA];
        Arrays.fill(primes, true);
        for (int i = 2; i < MAXA; i++) {
            if (primes[i]) {
                for (int j = i * 2; j < MAXA; j += i) {
                    primes[j] = false;
                }
            }
        }
        int[] xs = new int[input.nextInt()];
        for (int i = 0; i < xs.length; i++) {
            xs[i] = input.nextInt();
        }
        int count = 0;
        for (int x : xs) {
            boolean flag = true;
            for (int i = 2; i * i <= x; i++) {
                if (primes[i] && x % i == 0) {
                    flag = false;
                }
            }
            if (flag) {
                count++;
            }
        }
        System.out.println(count);
    }
    
    private void print(int[] xs) {
        StringBuilder sb = new StringBuilder();
        for (int x : xs) sb.append(x).append(' ');
        System.out.println(sb.toString().trim());
    }
} Main private int MAX = 1000000000; MAX 1000000000 private int MAXA = (int)Math.sqrt(MAX+1); MAXA (int)Math.sqrt(MAX+1) Math.sqrt Math MAX+1 MAX 1 public static void main(String[] args) {
        Main main = new Main();
        main.solv();
    } main {
        Main main = new Main();
        main.solv();
    } Main main = new Main(); main new Main() main.solv() main.solv main String[] args args private void solv() {
        Scanner input = new Scanner(System.in);
        
        boolean[] primes = new boolean[MAXA];
        Arrays.fill(primes, true);
        for (int i = 2; i < MAXA; i++) {
            if (primes[i]) {
                for (int j = i * 2; j < MAXA; j += i) {
                    primes[j] = false;
                }
            }
        }
        int[] xs = new int[input.nextInt()];
        for (int i = 0; i < xs.length; i++) {
            xs[i] = input.nextInt();
        }
        int count = 0;
        for (int x : xs) {
            boolean flag = true;
            for (int i = 2; i * i <= x; i++) {
                if (primes[i] && x % i == 0) {
                    flag = false;
                }
            }
            if (flag) {
                count++;
            }
        }
        System.out.println(count);
    } solv {
        Scanner input = new Scanner(System.in);
        
        boolean[] primes = new boolean[MAXA];
        Arrays.fill(primes, true);
        for (int i = 2; i < MAXA; i++) {
            if (primes[i]) {
                for (int j = i * 2; j < MAXA; j += i) {
                    primes[j] = false;
                }
            }
        }
        int[] xs = new int[input.nextInt()];
        for (int i = 0; i < xs.length; i++) {
            xs[i] = input.nextInt();
        }
        int count = 0;
        for (int x : xs) {
            boolean flag = true;
            for (int i = 2; i * i <= x; i++) {
                if (primes[i] && x % i == 0) {
                    flag = false;
                }
            }
            if (flag) {
                count++;
            }
        }
        System.out.println(count);
    } Scanner input = new Scanner(System.in); input new Scanner(System.in) boolean[] primes = new boolean[MAXA]; primes new boolean[MAXA] MAXA Arrays.fill(primes, true) Arrays.fill Arrays primes true for (int i = 2; i < MAXA; i++) {
            if (primes[i]) {
                for (int j = i * 2; j < MAXA; j += i) {
                    primes[j] = false;
                }
            }
        } int i = 2; int i = 2; i 2 i < MAXA i MAXA i++ i++ i {
            if (primes[i]) {
                for (int j = i * 2; j < MAXA; j += i) {
                    primes[j] = false;
                }
            }
        } {
            if (primes[i]) {
                for (int j = i * 2; j < MAXA; j += i) {
                    primes[j] = false;
                }
            }
        } if (primes[i]) {
                for (int j = i * 2; j < MAXA; j += i) {
                    primes[j] = false;
                }
            } primes[i] primes i {
                for (int j = i * 2; j < MAXA; j += i) {
                    primes[j] = false;
                }
            } for (int j = i * 2; j < MAXA; j += i) {
                    primes[j] = false;
                } int j = i * 2; int j = i * 2; j i * 2 i 2 j < MAXA j MAXA j += i j += i j i {
                    primes[j] = false;
                } {
                    primes[j] = false;
                } primes[j] = false primes[j] primes j false int[] xs = new int[input.nextInt()]; xs new int[input.nextInt()] input.nextInt() input.nextInt input for (int i = 0; i < xs.length; i++) {
            xs[i] = input.nextInt();
        } int i = 0; int i = 0; i 0 i < xs.length i xs.length xs xs.length i++ i++ i {
            xs[i] = input.nextInt();
        } {
            xs[i] = input.nextInt();
        } xs[i] = input.nextInt() xs[i] xs i input.nextInt() input.nextInt input int count = 0; count 0 for (int x : xs) {
            boolean flag = true;
            for (int i = 2; i * i <= x; i++) {
                if (primes[i] && x % i == 0) {
                    flag = false;
                }
            }
            if (flag) {
                count++;
            }
        } int x xs {
            boolean flag = true;
            for (int i = 2; i * i <= x; i++) {
                if (primes[i] && x % i == 0) {
                    flag = false;
                }
            }
            if (flag) {
                count++;
            }
        } {
            boolean flag = true;
            for (int i = 2; i * i <= x; i++) {
                if (primes[i] && x % i == 0) {
                    flag = false;
                }
            }
            if (flag) {
                count++;
            }
        } boolean flag = true; flag true for (int i = 2; i * i <= x; i++) {
                if (primes[i] && x % i == 0) {
                    flag = false;
                }
            } int i = 2; int i = 2; i 2 i * i <= x i * i i i x i++ i++ i {
                if (primes[i] && x % i == 0) {
                    flag = false;
                }
            } {
                if (primes[i] && x % i == 0) {
                    flag = false;
                }
            } if (primes[i] && x % i == 0) {
                    flag = false;
                } primes[i] && x % i == 0 primes[i] primes i x % i == 0 x % i x i 0 {
                    flag = false;
                } flag = false flag false if (flag) {
                count++;
            } flag {
                count++;
            } count++ count System.out.println(count) System.out.println System.out System System.out count private void print(int[] xs) {
        StringBuilder sb = new StringBuilder();
        for (int x : xs) sb.append(x).append(' ');
        System.out.println(sb.toString().trim());
    } print {
        StringBuilder sb = new StringBuilder();
        for (int x : xs) sb.append(x).append(' ');
        System.out.println(sb.toString().trim());
    } StringBuilder sb = new StringBuilder(); sb new StringBuilder() for (int x : xs) sb.append(x).append(' '); int x xs sb.append(x).append(' '); sb.append(x).append(' ') sb.append(x).append sb.append(x) sb.append sb x ' ' System.out.println(sb.toString().trim()) System.out.println System.out System System.out sb.toString().trim() sb.toString().trim sb.toString() sb.toString sb int[] xs xs public class Main {
    
    public static void main(String[] args) {
        Main main = new Main();
        main.solv();
    }
    
    private int MAX = 1000000000;
    private int MAXA = (int)Math.sqrt(MAX+1);
    private void solv() {
        Scanner input = new Scanner(System.in);
        
        boolean[] primes = new boolean[MAXA];
        Arrays.fill(primes, true);
        for (int i = 2; i < MAXA; i++) {
            if (primes[i]) {
                for (int j = i * 2; j < MAXA; j += i) {
                    primes[j] = false;
                }
            }
        }
        int[] xs = new int[input.nextInt()];
        for (int i = 0; i < xs.length; i++) {
            xs[i] = input.nextInt();
        }
        int count = 0;
        for (int x : xs) {
            boolean flag = true;
            for (int i = 2; i * i <= x; i++) {
                if (primes[i] && x % i == 0) {
                    flag = false;
                }
            }
            if (flag) {
                count++;
            }
        }
        System.out.println(count);
    }
    
    private void print(int[] xs) {
        StringBuilder sb = new StringBuilder();
        for (int x : xs) sb.append(x).append(' ');
        System.out.println(sb.toString().trim());
    }
} public class Main {
    
    public static void main(String[] args) {
        Main main = new Main();
        main.solv();
    }
    
    private int MAX = 1000000000;
    private int MAXA = (int)Math.sqrt(MAX+1);
    private void solv() {
        Scanner input = new Scanner(System.in);
        
        boolean[] primes = new boolean[MAXA];
        Arrays.fill(primes, true);
        for (int i = 2; i < MAXA; i++) {
            if (primes[i]) {
                for (int j = i * 2; j < MAXA; j += i) {
                    primes[j] = false;
                }
            }
        }
        int[] xs = new int[input.nextInt()];
        for (int i = 0; i < xs.length; i++) {
            xs[i] = input.nextInt();
        }
        int count = 0;
        for (int x : xs) {
            boolean flag = true;
            for (int i = 2; i * i <= x; i++) {
                if (primes[i] && x % i == 0) {
                    flag = false;
                }
            }
            if (flag) {
                count++;
            }
        }
        System.out.println(count);
    }
    
    private void print(int[] xs) {
        StringBuilder sb = new StringBuilder();
        for (int x : xs) sb.append(x).append(' ');
        System.out.println(sb.toString().trim());
    }
} Main
import java.util.*;

public class Main {
    
    public static void main(String[] args) {
        Main main = new Main();
        main.solv();
    }
    
    private int MAX = 1000000000;
    private int MAXA = (int)Math.sqrt(MAX+1);
    private void solv() {
        Scanner input = new Scanner(System.in);
        
        boolean[] primes = new boolean[MAXA];
        Arrays.fill(primes, true);
        for (int i = 2; i < MAXA; i++) {
            if (primes[i]) {
                for (int j = i * 2; j < MAXA; j += i) {
                    primes[j] = false;
                }
            }
        }
        int[] xs = new int[input.nextInt()];
        for (int i = 0; i < xs.length; i++) {
            xs[i] = input.nextInt();
        }
        int count = 0;
        for (int x : xs) {
            boolean flag = true;
            for (int i = 2; i * i <= x; i++) {
                if (primes[i] && x % i == 0) {
                    flag = false;
                }
            }
            if (flag) {
                count++;
            }
        }
        System.out.println(count);
    }
    
    private void print(int[] xs) {
        StringBuilder sb = new StringBuilder();
        for (int x : xs) sb.append(x).append(' ');
        System.out.println(sb.toString().trim());
    }
}