import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;

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

	public static void main(String[] args) throws IOException {
		ReaderWriter r = new ReaderWriter(); 	// Class to read/write input.
		String ans = "";			// Final answer to be printed.

		int n = r.rInt();		// Number of elements.
		int count = 0;
		for(int i = 0; i < n; i++) {
			if(isPrime(r.rInt())) count++;
		}

		ans += count;

		// Outputs final answer.
		r.pAns(ans);
		r.out.close();
	}


}

class ReaderWriter {
	BufferedReader br;
	PrintWriter out;
	StringTokenizer st;

	public ReaderWriter() {
		// br = new BufferedReader(new FileReader("in.txt"));
		// out = new PrintWriter(new FileWriter("out.txt"));
		br = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(new OutputStreamWriter(System.out));
	}

	String next() throws IOException  {
		while (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine().trim());
		return st.nextToken();
	}

	long rLong() throws IOException  {
		return Long.parseLong(next());
	}

	int rInt() throws IOException  {
		return Integer.parseInt(next());
	}

	int[] rIntArray(int n) throws IOException  {
		int[] ret = new int[n];
		for(int i = 0; i < n; i++) {
			ret[i] = rInt();
		}
		return ret;
	}

	double rDouble() throws IOException  {
		return Double.parseDouble(next());
	}

	char rChar() throws IOException  {
		return next().charAt(0);
	}

	String rLine() throws IOException  {
		return br.readLine().trim();
	}

	String wArray(int[] a) throws IOException {
		if(a == null || a.length == 0) {
			return "";
		}
		String ret = "" + a[0];
		for(int i = 1; i < a.length; i++) {
			ret = ret + " " + a[i];
		}
		ret = ret + "\n";
		return ret;
	}

	void pAns(String ans) {
	//	if(ans.charAt(ans.length()-1) == '\n')
	//		ans = ans.substring(0,ans.length()-1);
		System.out.println(ans);
	}
}

 import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.OutputStreamWriter; OutputStreamWriter java.io import java.io.PrintWriter; PrintWriter java.io import java.util.StringTokenizer; StringTokenizer java.util public class Main {
	static boolean isPrime(int n) {
		for(int i = 2; i*i <= n; i++) {
			if(n%i == 0) return false;
		}
		return true;
	}

	public static void main(String[] args) throws IOException {
		ReaderWriter r = new ReaderWriter(); 	// Class to read/write input.
		String ans = "";			// Final answer to be printed.

		int n = r.rInt();		// Number of elements.
		int count = 0;
		for(int i = 0; i < n; i++) {
			if(isPrime(r.rInt())) count++;
		}

		ans += count;

		// Outputs final answer.
		r.pAns(ans);
		r.out.close();
	}


} Main static boolean isPrime(int n) {
		for(int i = 2; i*i <= n; i++) {
			if(n%i == 0) return false;
		}
		return true;
	} isPrime {
		for(int i = 2; i*i <= n; i++) {
			if(n%i == 0) return false;
		}
		return true;
	} for(int i = 2; i*i <= n; i++) {
			if(n%i == 0) return false;
		} int i = 2; int i = 2; i 2 i*i <= n i*i i i n i++ i++ i {
			if(n%i == 0) return false;
		} {
			if(n%i == 0) return false;
		} if(n%i == 0) return false; n%i == 0 n%i n i 0 return false; false return true; true int n n public static void main(String[] args) throws IOException {
		ReaderWriter r = new ReaderWriter(); 	// Class to read/write input.
		String ans = "";			// Final answer to be printed.

		int n = r.rInt();		// Number of elements.
		int count = 0;
		for(int i = 0; i < n; i++) {
			if(isPrime(r.rInt())) count++;
		}

		ans += count;

		// Outputs final answer.
		r.pAns(ans);
		r.out.close();
	} main {
		ReaderWriter r = new ReaderWriter(); 	// Class to read/write input.
		String ans = "";			// Final answer to be printed.

		int n = r.rInt();		// Number of elements.
		int count = 0;
		for(int i = 0; i < n; i++) {
			if(isPrime(r.rInt())) count++;
		}

		ans += count;

		// Outputs final answer.
		r.pAns(ans);
		r.out.close();
	} ReaderWriter r = new ReaderWriter(); r new ReaderWriter() String ans = ""; ans "" int n = r.rInt(); n r.rInt() r.rInt r int count = 0; count 0 for(int i = 0; i < n; i++) {
			if(isPrime(r.rInt())) count++;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			if(isPrime(r.rInt())) count++;
		} {
			if(isPrime(r.rInt())) count++;
		} if(isPrime(r.rInt())) count++; isPrime(r.rInt()) isPrime r.rInt() r.rInt r count++ count ans += count ans count r.pAns(ans) r.pAns r ans r.out.close() r.out.close r.out r r.out String[] args args class ReaderWriter {
	BufferedReader br;
	PrintWriter out;
	StringTokenizer st;

	public ReaderWriter() {
		// br = new BufferedReader(new FileReader("in.txt"));
		// out = new PrintWriter(new FileWriter("out.txt"));
		br = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(new OutputStreamWriter(System.out));
	}

	String next() throws IOException  {
		while (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine().trim());
		return st.nextToken();
	}

	long rLong() throws IOException  {
		return Long.parseLong(next());
	}

	int rInt() throws IOException  {
		return Integer.parseInt(next());
	}

	int[] rIntArray(int n) throws IOException  {
		int[] ret = new int[n];
		for(int i = 0; i < n; i++) {
			ret[i] = rInt();
		}
		return ret;
	}

	double rDouble() throws IOException  {
		return Double.parseDouble(next());
	}

	char rChar() throws IOException  {
		return next().charAt(0);
	}

	String rLine() throws IOException  {
		return br.readLine().trim();
	}

	String wArray(int[] a) throws IOException {
		if(a == null || a.length == 0) {
			return "";
		}
		String ret = "" + a[0];
		for(int i = 1; i < a.length; i++) {
			ret = ret + " " + a[i];
		}
		ret = ret + "\n";
		return ret;
	}

	void pAns(String ans) {
	//	if(ans.charAt(ans.length()-1) == '\n')
	//		ans = ans.substring(0,ans.length()-1);
		System.out.println(ans);
	}
} ReaderWriter BufferedReader br; br PrintWriter out; out StringTokenizer st; st public ReaderWriter() {
		// br = new BufferedReader(new FileReader("in.txt"));
		// out = new PrintWriter(new FileWriter("out.txt"));
		br = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(new OutputStreamWriter(System.out));
	} ReaderWriter {
		// br = new BufferedReader(new FileReader("in.txt"));
		// out = new PrintWriter(new FileWriter("out.txt"));
		br = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(new OutputStreamWriter(System.out));
	} br = new BufferedReader(new InputStreamReader(System.in)) br new BufferedReader(new InputStreamReader(System.in)) out = new PrintWriter(new OutputStreamWriter(System.out)) out new PrintWriter(new OutputStreamWriter(System.out)) String next() throws IOException  {
		while (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine().trim());
		return st.nextToken();
	} next {
		while (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine().trim());
		return st.nextToken();
	} while (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine().trim()); st == null || !st.hasMoreTokens() st == null st null !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st st = new StringTokenizer(br.readLine().trim()) st new StringTokenizer(br.readLine().trim()) return st.nextToken(); st.nextToken() st.nextToken st long rLong() throws IOException  {
		return Long.parseLong(next());
	} rLong {
		return Long.parseLong(next());
	} return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next int rInt() throws IOException  {
		return Integer.parseInt(next());
	} rInt {
		return Integer.parseInt(next());
	} return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next int[] rIntArray(int n) throws IOException  {
		int[] ret = new int[n];
		for(int i = 0; i < n; i++) {
			ret[i] = rInt();
		}
		return ret;
	} rIntArray {
		int[] ret = new int[n];
		for(int i = 0; i < n; i++) {
			ret[i] = rInt();
		}
		return ret;
	} int[] ret = new int[n]; ret new int[n] n for(int i = 0; i < n; i++) {
			ret[i] = rInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			ret[i] = rInt();
		} {
			ret[i] = rInt();
		} ret[i] = rInt() ret[i] ret i rInt() rInt return ret; ret int n n double rDouble() throws IOException  {
		return Double.parseDouble(next());
	} rDouble {
		return Double.parseDouble(next());
	} return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next char rChar() throws IOException  {
		return next().charAt(0);
	} rChar {
		return next().charAt(0);
	} return next().charAt(0); next().charAt(0) next().charAt next() next 0 String rLine() throws IOException  {
		return br.readLine().trim();
	} rLine {
		return br.readLine().trim();
	} return br.readLine().trim(); br.readLine().trim() br.readLine().trim br.readLine() br.readLine br String wArray(int[] a) throws IOException {
		if(a == null || a.length == 0) {
			return "";
		}
		String ret = "" + a[0];
		for(int i = 1; i < a.length; i++) {
			ret = ret + " " + a[i];
		}
		ret = ret + "\n";
		return ret;
	} wArray {
		if(a == null || a.length == 0) {
			return "";
		}
		String ret = "" + a[0];
		for(int i = 1; i < a.length; i++) {
			ret = ret + " " + a[i];
		}
		ret = ret + "\n";
		return ret;
	} if(a == null || a.length == 0) {
			return "";
		} a == null || a.length == 0 a == null a null a.length == 0 a.length a a.length 0 {
			return "";
		} return ""; "" String ret = "" + a[0]; ret "" + a[0] "" a[0] a 0 for(int i = 1; i < a.length; i++) {
			ret = ret + " " + a[i];
		} int i = 1; int i = 1; i 1 i < a.length i a.length a a.length i++ i++ i {
			ret = ret + " " + a[i];
		} {
			ret = ret + " " + a[i];
		} ret = ret + " " + a[i] ret ret + " " + a[i] ret + " " + a[i] ret " " a[i] a i ret = ret + "\n" ret ret + "\n" ret "\n" return ret; ret int[] a a void pAns(String ans) {
	//	if(ans.charAt(ans.length()-1) == '\n')
	//		ans = ans.substring(0,ans.length()-1);
		System.out.println(ans);
	} pAns {
	//	if(ans.charAt(ans.length()-1) == '\n')
	//		ans = ans.substring(0,ans.length()-1);
		System.out.println(ans);
	} System.out.println(ans) System.out.println System.out System System.out ans String ans ans public class Main {
	static boolean isPrime(int n) {
		for(int i = 2; i*i <= n; i++) {
			if(n%i == 0) return false;
		}
		return true;
	}

	public static void main(String[] args) throws IOException {
		ReaderWriter r = new ReaderWriter(); 	// Class to read/write input.
		String ans = "";			// Final answer to be printed.

		int n = r.rInt();		// Number of elements.
		int count = 0;
		for(int i = 0; i < n; i++) {
			if(isPrime(r.rInt())) count++;
		}

		ans += count;

		// Outputs final answer.
		r.pAns(ans);
		r.out.close();
	}


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

	public static void main(String[] args) throws IOException {
		ReaderWriter r = new ReaderWriter(); 	// Class to read/write input.
		String ans = "";			// Final answer to be printed.

		int n = r.rInt();		// Number of elements.
		int count = 0;
		for(int i = 0; i < n; i++) {
			if(isPrime(r.rInt())) count++;
		}

		ans += count;

		// Outputs final answer.
		r.pAns(ans);
		r.out.close();
	}


} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;

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

	public static void main(String[] args) throws IOException {
		ReaderWriter r = new ReaderWriter(); 	// Class to read/write input.
		String ans = "";			// Final answer to be printed.

		int n = r.rInt();		// Number of elements.
		int count = 0;
		for(int i = 0; i < n; i++) {
			if(isPrime(r.rInt())) count++;
		}

		ans += count;

		// Outputs final answer.
		r.pAns(ans);
		r.out.close();
	}


}

class ReaderWriter {
	BufferedReader br;
	PrintWriter out;
	StringTokenizer st;

	public ReaderWriter() {
		// br = new BufferedReader(new FileReader("in.txt"));
		// out = new PrintWriter(new FileWriter("out.txt"));
		br = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(new OutputStreamWriter(System.out));
	}

	String next() throws IOException  {
		while (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine().trim());
		return st.nextToken();
	}

	long rLong() throws IOException  {
		return Long.parseLong(next());
	}

	int rInt() throws IOException  {
		return Integer.parseInt(next());
	}

	int[] rIntArray(int n) throws IOException  {
		int[] ret = new int[n];
		for(int i = 0; i < n; i++) {
			ret[i] = rInt();
		}
		return ret;
	}

	double rDouble() throws IOException  {
		return Double.parseDouble(next());
	}

	char rChar() throws IOException  {
		return next().charAt(0);
	}

	String rLine() throws IOException  {
		return br.readLine().trim();
	}

	String wArray(int[] a) throws IOException {
		if(a == null || a.length == 0) {
			return "";
		}
		String ret = "" + a[0];
		for(int i = 1; i < a.length; i++) {
			ret = ret + " " + a[i];
		}
		ret = ret + "\n";
		return ret;
	}

	void pAns(String ans) {
	//	if(ans.charAt(ans.length()-1) == '\n')
	//		ans = ans.substring(0,ans.length()-1);
		System.out.println(ans);
	}
}


