# coding=utf-8

n = int(input())
S = list(map(int, input().split()))
q = int(input())
counter = 0

for t in map(int, input().split()):
    if t in S:
        counter += 1

print(counter) n = int(input()) n int(input()) int input() input S = list(map(int, input().split())) S list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split q = int(input()) q int(input()) int input() input counter = 0 counter 0 for t in map(int, input().split()):
    if t in S:
        counter += 1 t map(int, input().split()) map int input().split() ().split () input split if t in S:
        counter += 1 t in S t S counter += 1 counter 1 print(counter) print counter S = list(map(int, input().split())) list(map(int, input().split())) S q = int(input()) int(input()) q counter = 0 0 counter n = int(input()) int(input()) n counter += 1 1 counter
# coding=utf-8

n = int(input())
S = list(map(int, input().split()))
q = int(input())
counter = 0

for t in map(int, input().split()):
    if t in S:
        counter += 1

print(counter)