fixing getEditCounts function