Implement numEdges functions and close #11