Fix inEdgeCount bug.