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

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

Sum = 0
for i in T:
  if i in S:
    Sum += 1
print(Sum)