Added method to count items in list