si(mcount)

this would work similarly to si(mindex), but return the module count. Without a second argument, returns the count of modules in the current module and only returns more than 0 when used on non-empty groups. Second argument would move up the hierarchy - 1 for parent, 2 for parent's parent etc.

Added to 3.43, thanks for your feedback!

It would be great if si(mcount) would count only the visible items, ignoring all the items with its visibility set to remove. Maybe by a third argument specifying if it would count all or only the visible ones.