Fix edges counter