N = int(input())
S = list(map(int, input().split()))
Q = int(input())
T = list(map(int, input().split()))
C = 0
for i in range(Q):
    if T[i] 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 i in range(Q):
    if T[i] in S:
        C+=1 i range(Q) range Q if T[i] in S:
        C+=1 T[i] in S T[i] T i S C+=1 C 1 print(C) print C N = int(input()) int(input()) N C = 0 0 C C+=1 1 C T = list(map(int, input().split())) list(map(int, input().split())) T Q = int(input()) int(input()) Q 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 i in range(Q):
    if T[i] in S:
        C+=1
print(C)
