
n = int(raw_input())
S = []
S = map(int, raw_input().split())

q = int(raw_input())
T = []
T = map(int, raw_input().split())

count = 0

for i in T:
	if i in S:
		count += 1

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

n = int(raw_input())
S = []
S = map(int, raw_input().split())

q = int(raw_input())
T = []
T = map(int, raw_input().split())

count = 0

for i in T:
	if i in S:
		count += 1

print count