isprime :: Int -> Bool
isprime 1 = False
isprime n = not $ or (map ((0==).(mod n)) [2..ceil])
    where ceil = ceiling (sqrt (fromIntegral n))
main = do
    n <- getLine >>= return . read
    numbers <- (sequence (take n (repeat getLine))) >>= return . (map read)
    print $ foldl (\acc x -> if isprime x then acc+1 else acc) 0 numbers 


