input()
S = input().split()
input()
print(len([s for s in input().split() if s in S])) input() input S = input().split() S input().split() ().split () input split input() input s for s in input().split() if s in S for s in input().split() if s in S s input().split() ().split () input split s in S s S if s in S s print(len([s for s in input().split() if s in S])) print len([s for s in input().split() if s in S]) len [s for s in input().split() if s in S] S = input().split() input().split() S
input()
S = input().split()
input()
print(len([s for s in input().split() if s in S]))
