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