n = int(raw_input())
S = map(int, raw_input().split())
q = int(raw_input())
T = map(int, raw_input().split())
count = 0
for x in T:
    if x in S:
        count += 1
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 x in T:
    if x in S:
        count += 1 x T if x in S:
        count += 1 x in S x S count += 1 count 1 print count += 1 1 count count = 0 0 count T = map(int, raw_input().split()) map(int, raw_input().split()) T n = int(raw_input()) int(raw_input()) n q = int(raw_input()) int(raw_input()) q S = map(int, raw_input().split()) map(int, raw_input().split()) S
n = int(raw_input())
S = map(int, raw_input().split())
q = int(raw_input())
T = map(int, raw_input().split())
count = 0
for x in T:
    if x in S:
        count += 1
print count