n = list(input())
sList = list(map(int,input().split()))

q = list(input())
tList = list(map(int,input().split()))

tCount = 0


for tmp_t in tList:
    if 0 < sList.count(tmp_t):
        tCount += 1

print(tCount) n = list(input()) n list(input()) list input() input sList = list(map(int,input().split())) sList list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split q = list(input()) q list(input()) list input() input tList = list(map(int,input().split())) tList list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split tCount = 0 tCount 0 for tmp_t in tList:
    if 0 < sList.count(tmp_t):
        tCount += 1 tmp_t tList if 0 < sList.count(tmp_t):
        tCount += 1 0 < sList.count(tmp_t) 0 sList.count(tmp_t) sList.count sList count tmp_t tCount += 1 tCount 1 print(tCount) print tCount tCount += 1 1 tCount q = list(input()) list(input()) q n = list(input()) list(input()) n sList = list(map(int,input().split())) list(map(int,input().split())) sList tList = list(map(int,input().split())) list(map(int,input().split())) tList tCount = 0 0 tCount
n = list(input())
sList = list(map(int,input().split()))

q = list(input())
tList = list(map(int,input().split()))

tCount = 0


for tmp_t in tList:
    if 0 < sList.count(tmp_t):
        tCount += 1

print(tCount)