input()
l = [int(i) for i in input().split()]
input()
c = 0
for i in input().split():
    for j in l:
        if int(i) == j:
            c += 1
            break
print(c) input() input int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i l = [int(i) for i in input().split()] l [int(i) for i in input().split()] input() input c = 0 c 0 for i in input().split():
    for j in l:
        if int(i) == j:
            c += 1
            break i input().split() ().split () input split for j in l:
        if int(i) == j:
            c += 1
            break j l if int(i) == j:
            c += 1
            break int(i) == j int(i) int i j c += 1 c 1 break print(c) print c c += 1 1 c l = [int(i) for i in input().split()] [int(i) for i in input().split()] l c = 0 0 c
input()
l = [int(i) for i in input().split()]
input()
c = 0
for i in input().split():
    for j in l:
        if int(i) == j:
            c += 1
            break
print(c)
