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

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

C = 0
for i in T:
    for j in S:
        if i == j:
            C += 1
            break
print C