n = raw_input()
S = map(int, raw_input().split())
q = raw_input()
T = map(int, raw_input().split())

cnt = 0
for i in T:
	if i in S:
		cnt += 1

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

cnt = 0
for i in T:
	if i in S:
		cnt += 1

print cnt