#coding: UTF-8
n = int(input())
S = list(map(int,input().split()))
q = int(input())
T = list(map(int,input().split()))
ans = 0
def linsearch(v,S):
  for w in S:
    if v == w:
      return True
  return False
  
for v in T:
  if linsearch(v,S):
    ans += 1
  
print(ans) 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 ans = 0 ans 0 def linsearch(v,S):
  for w in S:
    if v == w:
      return True
  return False
   linsearch for w in S:
    if v == w:
      return True
   w S if v == w:
      return True
   v == w v w return True True return False False v v S S for v in T:
  if linsearch(v,S):
    ans += 1
   v T if linsearch(v,S):
    ans += 1
   linsearch(v,S) linsearch v S ans += 1 ans 1 print(ans) print ans q = int(input()) int(input()) q def linsearch(v,S):
  for w in S:
    if v == w:
      return True
  return False
   def linsearch(v,S):
  for w in S:
    if v == w:
      return True
  return False
   linsearch ans = 0 0 ans ans += 1 1 ans S = list(map(int,input().split())) list(map(int,input().split())) S T = list(map(int,input().split())) list(map(int,input().split())) T n = int(input()) int(input()) n
#coding: UTF-8
n = int(input())
S = list(map(int,input().split()))
q = int(input())
T = list(map(int,input().split()))
ans = 0
def linsearch(v,S):
  for w in S:
    if v == w:
      return True
  return False
  
for v in T:
  if linsearch(v,S):
    ans += 1
  
print(ans)
