Should divide result by two because the graph is undirected and each edge is counted twice