Added getMax() method to get total labels