n = int(input())
s = list(map(int, input().split()))
q = int(input())
t = list(map(int, input().split()))
c = 0
for num in t:
    if num in s:
        c += 1

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

print(c)
