n = int(input())
S = map(int,raw_input().split())
q = int(input())
T = map(int,raw_input().split())
count = 0
for v in T:
    for i in range(n):
        if S[i] == v:
            count += 1
            break
print count n = int(input()) n int(input()) int input() input S = map(int,raw_input().split()) S map(int,raw_input().split()) map int raw_input().split() ().split () raw_input split q = int(input()) q int(input()) int 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 v in T:
    for i in range(n):
        if S[i] == v:
            count += 1
            break v T for i in range(n):
        if S[i] == v:
            count += 1
            break i range(n) range n if S[i] == v:
            count += 1
            break S[i] == v S[i] S i v count += 1 count 1 break print S = map(int,raw_input().split()) map(int,raw_input().split()) S T = map(int,raw_input().split()) map(int,raw_input().split()) T q = int(input()) int(input()) q count = 0 0 count n = int(input()) int(input()) n count += 1 1 count
n = int(input())
S = map(int,raw_input().split())
q = int(input())
T = map(int,raw_input().split())
count = 0
for v in T:
    for i in range(n):
        if S[i] == v:
            count += 1
            break
print count