# -*- coding: utf-8 -*-

n = int(raw_input())
S = map(int, raw_input().split())
q = int(raw_input())
T = map(int, raw_input().split())
count = 0
for i in range(q):
    for j in range(n):
        if T[i] == S[j]:
            count += 1
            break
print count n = int(raw_input()) n int(raw_input()) int raw_input() raw_input S = map(int, raw_input().split()) S map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split q = int(raw_input()) q int(raw_input()) int raw_input() raw_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):
    for j in range(n):
        if T[i] == S[j]:
            count += 1
            break i range(q) range q for j in range(n):
        if T[i] == S[j]:
            count += 1
            break j range(n) range n if T[i] == S[j]:
            count += 1
            break T[i] == S[j] T[i] T i S[j] S j count += 1 count 1 break print S = map(int, raw_input().split()) map(int, raw_input().split()) S count += 1 1 count count = 0 0 count T = map(int, raw_input().split()) map(int, raw_input().split()) T q = int(raw_input()) int(raw_input()) q n = int(raw_input()) int(raw_input()) n
# -*- coding: utf-8 -*-

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