n = int(input())
s = list(map(int,input().split()))
q = int(input())
r = list(map(int,input().split()))
cou = 0

for i in range(q):
    for j in range(n):
        if(s[j] == r[i]):
            cou += 1
            break
print(cou) 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 r = list(map(int,input().split())) r list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split cou = 0 cou 0 for i in range(q):
    for j in range(n):
        if(s[j] == r[i]):
            cou += 1
            break i range(q) range q for j in range(n):
        if(s[j] == r[i]):
            cou += 1
            break j range(n) range n if(s[j] == r[i]):
            cou += 1
            break s[j] == r[i] s[j] s j r[i] r i cou += 1 cou 1 break print(cou) print cou q = int(input()) int(input()) q cou = 0 0 cou cou += 1 1 cou r = list(map(int,input().split())) list(map(int,input().split())) r s = list(map(int,input().split())) list(map(int,input().split())) s n = int(input()) int(input()) n
n = int(input())
s = list(map(int,input().split()))
q = int(input())
r = list(map(int,input().split()))
cou = 0

for i in range(q):
    for j in range(n):
        if(s[j] == r[i]):
            cou += 1
            break
print(cou)
