count the edges for each node
oops