https://stackoverflow.com/a/58812904/16977974
The link above addresses keeping track of grouping. However once multi-grouping is attempted, all top level counts are set to 0. Is there a way to keep the original top level counts by keeping track of a counter?