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

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

c = 0
for t in T:
    for s in S:
        if(t == s):
            c+=1
            break
print c