n = int(raw_input())
if n > 1:
    s = map(int, raw_input().split())
else:
    s = int(raw_input())
    
q = int(raw_input())
if q > 1:
    t = map(int, raw_input().split())
else:
    t = int(raw_input())

count = 0
for i in range(q):
    try:
        a = s.index(t[i])
        count += 1
    except:
        pass

print count n = int(raw_input()) n int(raw_input()) int raw_input() raw_input if n > 1:
    s = map(int, raw_input().split())
else:
    s = int(raw_input())
     n > 1 n 1 s = map(int, raw_input().split()) s map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split s = int(raw_input()) s int(raw_input()) int raw_input() raw_input q = int(raw_input()) q int(raw_input()) int raw_input() raw_input if q > 1:
    t = map(int, raw_input().split())
else:
    t = int(raw_input()) q > 1 q 1 t = map(int, raw_input().split()) t map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split t = int(raw_input()) t int(raw_input()) int raw_input() raw_input count = 0 count 0 for i in range(q):
    try:
        a = s.index(t[i])
        count += 1
    except:
        pass i range(q) range q try:
        a = s.index(t[i])
        count += 1
    except:
        pass except:
        pass a = s.index(t[i]) a s.index(t[i]) s.index s index t[i] t i count += 1 count 1 print t = int(raw_input()) int(raw_input()) t count += 1 1 count s = map(int, raw_input().split()) map(int, raw_input().split()) s t = map(int, raw_input().split()) map(int, raw_input().split()) t q = int(raw_input()) int(raw_input()) q a = s.index(t[i]) s.index(t[i]) a count = 0 0 count n = int(raw_input()) int(raw_input()) n s = int(raw_input()) int(raw_input()) s
n = int(raw_input())
if n > 1:
    s = map(int, raw_input().split())
else:
    s = int(raw_input())
    
q = int(raw_input())
if q > 1:
    t = map(int, raw_input().split())
else:
    t = int(raw_input())

count = 0
for i in range(q):
    try:
        a = s.index(t[i])
        count += 1
    except:
        pass

print count