import Control.Applicative
import Control.Monad
import Data.List
strToInt s = (read :: String -> Int) s

main = do
    n <- getLine
    s <- map strToInt . words <$> getLine
    q <- getLine
    t <- map strToInt . words <$> getLine
    let s' = nub s
    let t' = nub t
    let s'' = s' \\ t'
    print (length s' - length s'')