N1=int(input())
array1=input().split()
N2=int(input())
array2=input().split()
c=0
for n2 in range(N2):
    if array2[n2] in array1:
        c+=1
print(c) N1=int(input()) N1 int(input()) int input() input array1=input().split() array1 input().split() ().split () input split N2=int(input()) N2 int(input()) int input() input array2=input().split() array2 input().split() ().split () input split c=0 c 0 for n2 in range(N2):
    if array2[n2] in array1:
        c+=1 n2 range(N2) range N2 if array2[n2] in array1:
        c+=1 array2[n2] in array1 array2[n2] array2 n2 array1 c+=1 c 1 print(c) print c array1=input().split() input().split() array1 array2=input().split() input().split() array2 N1=int(input()) int(input()) N1 c=0 0 c N2=int(input()) int(input()) N2 c+=1 1 c
N1=int(input())
array1=input().split()
N2=int(input())
array2=input().split()
c=0
for n2 in range(N2):
    if array2[n2] in array1:
        c+=1
print(c)
