n = int(input())
s = list(map(int,input().rstrip().split()))
q = int(input())
t = list(map(int,input().rstrip().split()))

count = 0
for _t in t:
    for _s in s:
        if _t == _s:
            count += 1
            break
print(count) n = int(input()) n int(input()) int input() input s = list(map(int,input().rstrip().split())) s list(map(int,input().rstrip().split())) list map(int,input().rstrip().split()) map int input().rstrip().split() ().rstrip().split ().rstrip() ().rstrip () input rstrip split q = int(input()) q int(input()) int input() input t = list(map(int,input().rstrip().split())) t list(map(int,input().rstrip().split())) list map(int,input().rstrip().split()) map int input().rstrip().split() ().rstrip().split ().rstrip() ().rstrip () input rstrip split count = 0 count 0 for _t in t:
    for _s in s:
        if _t == _s:
            count += 1
            break _t t for _s in s:
        if _t == _s:
            count += 1
            break _s s if _t == _s:
            count += 1
            break _t == _s _t _s count += 1 count 1 break print(count) print count q = int(input()) int(input()) q count = 0 0 count s = list(map(int,input().rstrip().split())) list(map(int,input().rstrip().split())) s n = int(input()) int(input()) n t = list(map(int,input().rstrip().split())) list(map(int,input().rstrip().split())) t count += 1 1 count
n = int(input())
s = list(map(int,input().rstrip().split()))
q = int(input())
t = list(map(int,input().rstrip().split()))

count = 0
for _t in t:
    for _s in s:
        if _t == _s:
            count += 1
            break
print(count)
