n = input()
S = set([int(s) for s in raw_input().split()])
m = input()
T = set([int(s) for s in raw_input().split()])
print len(T & S) n = input() n input() input int(s) for s in raw_input().split() for s in raw_input().split() s raw_input().split() ().split () raw_input split for s in raw_input().split() int(s) int s S = set([int(s) for s in raw_input().split()]) S set([int(s) for s in raw_input().split()]) set [int(s) for s in raw_input().split()] m = input() m input() input int(s) for s in raw_input().split() for s in raw_input().split() s raw_input().split() ().split () raw_input split for s in raw_input().split() int(s) int s T = set([int(s) for s in raw_input().split()]) T set([int(s) for s in raw_input().split()]) set [int(s) for s in raw_input().split()] print len(T & S) len T & S T S S = set([int(s) for s in raw_input().split()]) set([int(s) for s in raw_input().split()]) S m = input() input() m n = input() input() n T = set([int(s) for s in raw_input().split()]) set([int(s) for s in raw_input().split()]) T
n = input()
S = set([int(s) for s in raw_input().split()])
m = input()
T = set([int(s) for s in raw_input().split()])
print len(T & S)