I have a list which consist of series of groups and I have to calculate number of elements for every group. I have done this with sprintf function but I want to do this task