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

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

ans = 0

for i in T:
    if i in S:
        ans += 1

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

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

ans = 0

for i in T:
    if i in S:
        ans += 1

print ans