#get input
n = input()
S = map(lambda x: int(x), input().split(' '))
q = input()
T = list(map(lambda x: int(x), input().split(' ')))

#create T set
T_set = set(T)

#iterate S and counting
count = 0
for i in S:
    if i in T_set:
        count += 1
        T_set.remove(i)

print(count) n = input() n input() input S = map(lambda x: int(x), input().split(' ')) S map(lambda x: int(x), input().split(' ')) map lambda x: int(x) int(x) int x x input().split(' ') ().split () input split ' ' q = input() q input() input T = list(map(lambda x: int(x), input().split(' '))) T list(map(lambda x: int(x), input().split(' '))) list map(lambda x: int(x), input().split(' ')) map lambda x: int(x) int(x) int x x input().split(' ') ().split () input split ' ' T_set = set(T) T_set set(T) set T count = 0 count 0 for i in S:
    if i in T_set:
        count += 1
        T_set.remove(i) i S if i in T_set:
        count += 1
        T_set.remove(i) i in T_set i T_set count += 1 count 1 T_set.remove(i) T_set.remove T_set remove i print(count) print count count = 0 0 count count += 1 1 count n = input() input() n T_set = set(T) set(T) T_set T = list(map(lambda x: int(x), input().split(' '))) list(map(lambda x: int(x), input().split(' '))) T q = input() input() q S = map(lambda x: int(x), input().split(' ')) map(lambda x: int(x), input().split(' ')) S
#get input
n = input()
S = map(lambda x: int(x), input().split(' '))
q = input()
T = list(map(lambda x: int(x), input().split(' ')))

#create T set
T_set = set(T)

#iterate S and counting
count = 0
for i in S:
    if i in T_set:
        count += 1
        T_set.remove(i)

print(count)
