n = input()
S = map(int, raw_input().split())
q = input()
T = map(int, raw_input().split())

count = 0

for i in range(q):
    Search = T[i]
    for j in range(n):
        if S[j] == Search:
            count = count + 1
            break

print count n = input() n input() input S = map(int, raw_input().split()) S map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split q = input() q input() input T = map(int, raw_input().split()) T map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split count = 0 count 0 for i in range(q):
    Search = T[i]
    for j in range(n):
        if S[j] == Search:
            count = count + 1
            break i range(q) range q Search = T[i] Search T[i] T i for j in range(n):
        if S[j] == Search:
            count = count + 1
            break j range(n) range n if S[j] == Search:
            count = count + 1
            break S[j] == Search S[j] S j Search count = count + 1 count count + 1 count 1 break print q = input() input() q count = count + 1 count + 1 count n = input() input() n S = map(int, raw_input().split()) map(int, raw_input().split()) S T = map(int, raw_input().split()) map(int, raw_input().split()) T Search = T[i] T[i] Search count = 0 0 count
n = input()
S = map(int, raw_input().split())
q = input()
T = map(int, raw_input().split())

count = 0

for i in range(q):
    Search = T[i]
    for j in range(n):
        if S[j] == Search:
            count = count + 1
            break

print count