return the total number of neighbors by using pysal's weights object

I construct a weights object:import pysal as psneighbors = {0: [3, 1], 1: [0, 2, 2], 2: [1, 2], 3: [0, 1, 1]}weights = {0: [1, 1], 1: [1, 1, 1], 2: [1, 1], 3: [1, 1, 1]}w = ps.W(neighbors, weights)Weights object in pysal has a neighbors attribute like the following:w.neighborsIt will returns a dict: {0: [3, 1], 1: [0, 2, 2], 2: [1, 2], 3: [0, 1, 1]}. I've checked pysal's api and find lots of methods and attribute to return something about the number of neighbors but not the total number of all neighbors. For the above w, I want it to return som...Read more