avoid passing value_counts (only length is needed)