node degree counts loops