package main

import (
    "fmt"
    "math"
    )
    
func countPrime(nums []int)int{
    counter := 0
    for i := range nums{
        if(true == isPrime(nums[i])){
            counter ++
        }
    }
    return counter
}

func isPrime(num int) bool{
    
    if num == 2 {
        return true
    } else if num < 2 {
        return false
    } else if (num / 2) == 0 {
        return false
    } else {
        for i:=3; i<=int(math.Sqrt(float64(num))); i+=2{
            if (num / i) == 0 {
                return false
            }
        }
    }
    return true
}

func main(){
    var num int
    fmt.Scanln(&num)
    nums := make([]int, num)
    for i := range nums{
        fmt.Scanln(&nums[i])
    }
    fmt.Println(countPrime(nums))
}
