n = int(input())
S = set(map(int, input().split()))
q = int(input())
T = list(map(int, input().split()))

sum = 0

for i in T:
    if i in S:
        sum +=1
        
print(sum) n = int(input()) n int(input()) int input() input S = set(map(int, input().split())) S set(map(int, input().split())) set map(int, input().split()) map int input().split() ().split () input split q = int(input()) q int(input()) int input() input T = list(map(int, input().split())) T list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split sum = 0 sum 0 for i in T:
    if i in S:
        sum +=1
         i T if i in S:
        sum +=1
         i in S i S sum +=1 sum 1 print(sum) print sum T = list(map(int, input().split())) list(map(int, input().split())) T S = set(map(int, input().split())) set(map(int, input().split())) S sum +=1 1 sum n = int(input()) int(input()) n sum = 0 0 sum q = int(input()) int(input()) q
n = int(input())
S = set(map(int, input().split()))
q = int(input())
T = list(map(int, input().split()))

sum = 0

for i in T:
    if i in S:
        sum +=1
        
print(sum)