package main

import (
	"fmt"
)

func isPrime(N int) int{
	if N < 2 {
		return 0
	}
	if N == 2 {
		return 1
	} else if N % 2 == 0 {
		return 0
	}
	for i := 3; i*i < N; i+=2 {
		if N % i == 0 {
			return 0
		}
	}
	return 1
}

func main(){
	var N, In int
	var count int
	fmt.Scanf("%d",&N);
	for i := 0; i < N; i++ {
		fmt.Scanf("%d",&In)
	    
		count = isPrime(In) + count
	}

	
	fmt.Printf("%d\n",count)
}
