Add number of edges computation