added a method to calculate the number of label collision and their depth