n = input()
S = map(int,raw_input().split())
q = input()
T = map(int,raw_input().split())
ans = 0
for t in T:
    if t in S:
        ans+=1
print ans n = input() n input() input S = map(int,raw_input().split()) S map(int,raw_input().split()) map int raw_input().split() ().split () raw_input split q = input() q input() input T = map(int,raw_input().split()) T map(int,raw_input().split()) map int raw_input().split() ().split () raw_input split ans = 0 ans 0 for t in T:
    if t in S:
        ans+=1 t T if t in S:
        ans+=1 t in S t S ans+=1 ans 1 print ans = 0 0 ans ans+=1 1 ans T = map(int,raw_input().split()) map(int,raw_input().split()) T S = map(int,raw_input().split()) map(int,raw_input().split()) S q = input() input() q n = input() input() n
n = input()
S = map(int,raw_input().split())
q = input()
T = map(int,raw_input().split())
ans = 0
for t in T:
    if t in S:
        ans+=1
print ans