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

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

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

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

print(cnt)
