n = int(raw_input())
S = raw_input().split(" ")
q = int(raw_input())
T = raw_input().split(" ")

cnt = 0

for i in range(q):
    key = T[i]
    for j in range(n-1):
        if S[j] == key:
            cnt += 1
            break

print cnt n = int(raw_input()) n int(raw_input()) int raw_input() raw_input S = raw_input().split(" ") S raw_input().split(" ") ().split () raw_input split " " q = int(raw_input()) q int(raw_input()) int raw_input() raw_input T = raw_input().split(" ") T raw_input().split(" ") ().split () raw_input split " " cnt = 0 cnt 0 for i in range(q):
    key = T[i]
    for j in range(n-1):
        if S[j] == key:
            cnt += 1
            break i range(q) range q key = T[i] key T[i] T i for j in range(n-1):
        if S[j] == key:
            cnt += 1
            break j range(n-1) range n-1 n 1 if S[j] == key:
            cnt += 1
            break S[j] == key S[j] S j key cnt += 1 cnt 1 break print key = T[i] T[i] key S = raw_input().split(" ") raw_input().split(" ") S q = int(raw_input()) int(raw_input()) q T = raw_input().split(" ") raw_input().split(" ") T cnt = 0 0 cnt n = int(raw_input()) int(raw_input()) n cnt += 1 1 cnt
n = int(raw_input())
S = raw_input().split(" ")
q = int(raw_input())
T = raw_input().split(" ")

cnt = 0

for i in range(q):
    key = T[i]
    for j in range(n-1):
        if S[j] == key:
            cnt += 1
            break

print cnt