It returns number of compartments of each segment.