n = input()
S = list(map(int,input().split()))
n = input()
T = list(map(int,input().split()))
count =  0
for i in T:
    if i in S:
        count+= 1
print(count) n = input() n 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 n = input() n input() input T = list(map(int,input().split())) T list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split count =  0 count 0 for i in T:
    if i in S:
        count+= 1 i T if i in S:
        count+= 1 i in S i S count+= 1 count 1 print(count) print count S = list(map(int,input().split())) list(map(int,input().split())) S n = input() input() n count+= 1 1 count count =  0 0 count n = input() input() n T = list(map(int,input().split())) list(map(int,input().split())) T
n = input()
S = list(map(int,input().split()))
n = input()
T = list(map(int,input().split()))
count =  0
for i in T:
    if i in S:
        count+= 1
print(count)