
n=int(input())
lista=[0 for i in range(n)]
lista=input().split()
n2=int(input())
listb=[0 for i in range(n2)]
listb=input().split()
cnt=0
for i in range(n2):
    x=0
    
    for j in range(n):
        if listb[i]==lista[j] and x==0:
            x=1
            cnt+=1

print(cnt) n=int(input()) n int(input()) int input() input 0 for i in range(n) for i in range(n) i range(n) range n for i in range(n) 0 lista=[0 for i in range(n)] lista [0 for i in range(n)] lista=input().split() lista input().split() ().split () input split n2=int(input()) n2 int(input()) int input() input 0 for i in range(n2) for i in range(n2) i range(n2) range n2 for i in range(n2) 0 listb=[0 for i in range(n2)] listb [0 for i in range(n2)] listb=input().split() listb input().split() ().split () input split cnt=0 cnt 0 for i in range(n2):
    x=0
    
    for j in range(n):
        if listb[i]==lista[j] and x==0:
            x=1
            cnt+=1 i range(n2) range n2 x=0 x 0 for j in range(n):
        if listb[i]==lista[j] and x==0:
            x=1
            cnt+=1 j range(n) range n if listb[i]==lista[j] and x==0:
            x=1
            cnt+=1 listb[i]==lista[j] and x==0 listb[i]==lista[j] listb[i] listb i lista[j] lista j x==0 x 0 x=1 x 1 cnt+=1 cnt 1 print(cnt) print cnt x=0 0 x cnt=0 0 cnt listb=input().split() input().split() listb lista=[0 for i in range(n)] [0 for i in range(n)] lista n=int(input()) int(input()) n x=1 1 x lista=input().split() input().split() lista listb=[0 for i in range(n2)] [0 for i in range(n2)] listb n2=int(input()) int(input()) n2 cnt+=1 1 cnt

n=int(input())
lista=[0 for i in range(n)]
lista=input().split()
n2=int(input())
listb=[0 for i in range(n2)]
listb=input().split()
cnt=0
for i in range(n2):
    x=0
    
    for j in range(n):
        if listb[i]==lista[j] and x==0:
            x=1
            cnt+=1

print(cnt)
