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

C = 0
for t in T:
  for s in S:
    if s == t:
      C += 1
      break
print(C) 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 C = 0 C 0 for t in T:
  for s in S:
    if s == t:
      C += 1
      break t T for s in S:
    if s == t:
      C += 1
      break s S if s == t:
      C += 1
      break s == t s t C += 1 C 1 break print(C) print C n = int(input()) int(input()) n C += 1 1 C q = int(input()) int(input()) q T = list(map(int, input().split())) list(map(int, input().split())) T C = 0 0 C S = list(map(int, input().split())) list(map(int, input().split())) S
n = int(input())
S = list(map(int, input().split()))
q = int(input())
T = list(map(int, input().split()))

C = 0
for t in T:
  for s in S:
    if s == t:
      C += 1
      break
print(C)