
n=int(input())
S=[]
S=input().split()
q=int(input())
T=[]
T=input().split()
point=0
for i in range(q):	
	for j in range(n):
		if T[i]==S[j]:
			point+=1
			break
			
print(point) n=int(input()) n int(input()) int input() input S=[] S [] S=input().split() S input().split() ().split () input split q=int(input()) q int(input()) int input() input T=[] T [] T=input().split() T input().split() ().split () input split point=0 point 0 for i in range(q):	
	for j in range(n):
		if T[i]==S[j]:
			point+=1
			break
			 i range(q) range q for j in range(n):
		if T[i]==S[j]:
			point+=1
			break
			 j range(n) range n if T[i]==S[j]:
			point+=1
			break
			 T[i]==S[j] T[i] T i S[j] S j point+=1 point 1 break print(point) print point q=int(input()) int(input()) q point=0 0 point n=int(input()) int(input()) n S=input().split() input().split() S T=input().split() input().split() T point+=1 1 point S=[] [] S T=[] [] T

n=int(input())
S=[]
S=input().split()
q=int(input())
T=[]
T=input().split()
point=0
for i in range(q):	
	for j in range(n):
		if T[i]==S[j]:
			point+=1
			break
			
print(point)
