n = input()

S = [int(x) for x in raw_input().split()]

q = input()

T = [int(x) for x in raw_input().split()]

C = 0

for i in T:
 for j in S:
  if i==j:
   C += 1
   break

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

S = [int(x) for x in raw_input().split()]

q = input()

T = [int(x) for x in raw_input().split()]

C = 0

for i in T:
 for j in S:
  if i==j:
   C += 1
   break

print C