
import java.io.*;
import java.util.*;

class Main{
	public static void main(String[] args){
		solve();
	}
	public static void solve(){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] num = new int[n];
		for(int i=0;i<n;i++){
			num[i] = sc.nextInt();
		}
		int etc = (int)Math.sqrt(100000000)+3;
		boolean[] prime = new boolean[etc];
		Arrays.fill(prime, true);
		prime[0] = false;
		prime[1] = false;
		ArrayList<Integer> list = new ArrayList<Integer>();
		for(int i=2;i<etc;i++){
			if(prime[i]){
				list.add(i);
				for(int j=i*2;j<etc;j=j+i){
					prime[j] = false;
				}
			}
		}

		int count = 0;
		for(int i=0;i<n;i++){
			boolean flag = true;
			for(int j=0;j<list.size();j++){
				int x = list.get(j);
				if(num[i] <= x){
					break;
				}
				if(num[i]%x==0){
					flag = false;
				}
			}
			if(flag){
				count++;
			}
		}

		System.out.println(count);

	}
}

 import java.io.*; io.* java import java.util.*; util.* java class Main{
	public static void main(String[] args){
		solve();
	}
	public static void solve(){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] num = new int[n];
		for(int i=0;i<n;i++){
			num[i] = sc.nextInt();
		}
		int etc = (int)Math.sqrt(100000000)+3;
		boolean[] prime = new boolean[etc];
		Arrays.fill(prime, true);
		prime[0] = false;
		prime[1] = false;
		ArrayList<Integer> list = new ArrayList<Integer>();
		for(int i=2;i<etc;i++){
			if(prime[i]){
				list.add(i);
				for(int j=i*2;j<etc;j=j+i){
					prime[j] = false;
				}
			}
		}

		int count = 0;
		for(int i=0;i<n;i++){
			boolean flag = true;
			for(int j=0;j<list.size();j++){
				int x = list.get(j);
				if(num[i] <= x){
					break;
				}
				if(num[i]%x==0){
					flag = false;
				}
			}
			if(flag){
				count++;
			}
		}

		System.out.println(count);

	}
} Main public static void main(String[] args){
		solve();
	} main {
		solve();
	} solve() solve String[] args args public static void solve(){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] num = new int[n];
		for(int i=0;i<n;i++){
			num[i] = sc.nextInt();
		}
		int etc = (int)Math.sqrt(100000000)+3;
		boolean[] prime = new boolean[etc];
		Arrays.fill(prime, true);
		prime[0] = false;
		prime[1] = false;
		ArrayList<Integer> list = new ArrayList<Integer>();
		for(int i=2;i<etc;i++){
			if(prime[i]){
				list.add(i);
				for(int j=i*2;j<etc;j=j+i){
					prime[j] = false;
				}
			}
		}

		int count = 0;
		for(int i=0;i<n;i++){
			boolean flag = true;
			for(int j=0;j<list.size();j++){
				int x = list.get(j);
				if(num[i] <= x){
					break;
				}
				if(num[i]%x==0){
					flag = false;
				}
			}
			if(flag){
				count++;
			}
		}

		System.out.println(count);

	} solve {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] num = new int[n];
		for(int i=0;i<n;i++){
			num[i] = sc.nextInt();
		}
		int etc = (int)Math.sqrt(100000000)+3;
		boolean[] prime = new boolean[etc];
		Arrays.fill(prime, true);
		prime[0] = false;
		prime[1] = false;
		ArrayList<Integer> list = new ArrayList<Integer>();
		for(int i=2;i<etc;i++){
			if(prime[i]){
				list.add(i);
				for(int j=i*2;j<etc;j=j+i){
					prime[j] = false;
				}
			}
		}

		int count = 0;
		for(int i=0;i<n;i++){
			boolean flag = true;
			for(int j=0;j<list.size();j++){
				int x = list.get(j);
				if(num[i] <= x){
					break;
				}
				if(num[i]%x==0){
					flag = false;
				}
			}
			if(flag){
				count++;
			}
		}

		System.out.println(count);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] num = new int[n]; num new int[n] n for(int i=0;i<n;i++){
			num[i] = sc.nextInt();
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			num[i] = sc.nextInt();
		} {
			num[i] = sc.nextInt();
		} num[i] = sc.nextInt() num[i] num i sc.nextInt() sc.nextInt sc int etc = (int)Math.sqrt(100000000)+3; etc (int)Math.sqrt(100000000)+3 (int)Math.sqrt(100000000) Math.sqrt Math 100000000 3 boolean[] prime = new boolean[etc]; prime new boolean[etc] etc Arrays.fill(prime, true) Arrays.fill Arrays prime true prime[0] = false prime[0] prime 0 false prime[1] = false prime[1] prime 1 false ArrayList<Integer> list = new ArrayList<Integer>(); list new ArrayList<Integer>() for(int i=2;i<etc;i++){
			if(prime[i]){
				list.add(i);
				for(int j=i*2;j<etc;j=j+i){
					prime[j] = false;
				}
			}
		} int i=2; int i=2; i 2 i<etc i etc i++ i++ i {
			if(prime[i]){
				list.add(i);
				for(int j=i*2;j<etc;j=j+i){
					prime[j] = false;
				}
			}
		} {
			if(prime[i]){
				list.add(i);
				for(int j=i*2;j<etc;j=j+i){
					prime[j] = false;
				}
			}
		} if(prime[i]){
				list.add(i);
				for(int j=i*2;j<etc;j=j+i){
					prime[j] = false;
				}
			} prime[i] prime i {
				list.add(i);
				for(int j=i*2;j<etc;j=j+i){
					prime[j] = false;
				}
			} list.add(i) list.add list i for(int j=i*2;j<etc;j=j+i){
					prime[j] = false;
				} int j=i*2; int j=i*2; j i*2 i 2 j<etc j etc j=j+i j=j+i j j+i j i {
					prime[j] = false;
				} {
					prime[j] = false;
				} prime[j] = false prime[j] prime j false int count = 0; count 0 for(int i=0;i<n;i++){
			boolean flag = true;
			for(int j=0;j<list.size();j++){
				int x = list.get(j);
				if(num[i] <= x){
					break;
				}
				if(num[i]%x==0){
					flag = false;
				}
			}
			if(flag){
				count++;
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			boolean flag = true;
			for(int j=0;j<list.size();j++){
				int x = list.get(j);
				if(num[i] <= x){
					break;
				}
				if(num[i]%x==0){
					flag = false;
				}
			}
			if(flag){
				count++;
			}
		} {
			boolean flag = true;
			for(int j=0;j<list.size();j++){
				int x = list.get(j);
				if(num[i] <= x){
					break;
				}
				if(num[i]%x==0){
					flag = false;
				}
			}
			if(flag){
				count++;
			}
		} boolean flag = true; flag true for(int j=0;j<list.size();j++){
				int x = list.get(j);
				if(num[i] <= x){
					break;
				}
				if(num[i]%x==0){
					flag = false;
				}
			} int j=0; int j=0; j 0 j<list.size() j list.size() list.size list j++ j++ j {
				int x = list.get(j);
				if(num[i] <= x){
					break;
				}
				if(num[i]%x==0){
					flag = false;
				}
			} {
				int x = list.get(j);
				if(num[i] <= x){
					break;
				}
				if(num[i]%x==0){
					flag = false;
				}
			} int x = list.get(j); x list.get(j) list.get list j if(num[i] <= x){
					break;
				} num[i] <= x num[i] num i x {
					break;
				} break; if(num[i]%x==0){
					flag = false;
				} num[i]%x==0 num[i]%x num[i] num i x 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

import java.io.*;
import java.util.*;

class Main{
	public static void main(String[] args){
		solve();
	}
	public static void solve(){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] num = new int[n];
		for(int i=0;i<n;i++){
			num[i] = sc.nextInt();
		}
		int etc = (int)Math.sqrt(100000000)+3;
		boolean[] prime = new boolean[etc];
		Arrays.fill(prime, true);
		prime[0] = false;
		prime[1] = false;
		ArrayList<Integer> list = new ArrayList<Integer>();
		for(int i=2;i<etc;i++){
			if(prime[i]){
				list.add(i);
				for(int j=i*2;j<etc;j=j+i){
					prime[j] = false;
				}
			}
		}

		int count = 0;
		for(int i=0;i<n;i++){
			boolean flag = true;
			for(int j=0;j<list.size();j++){
				int x = list.get(j);
				if(num[i] <= x){
					break;
				}
				if(num[i]%x==0){
					flag = false;
				}
			}
			if(flag){
				count++;
			}
		}

		System.out.println(count);

	}
}


