Re #7845. Removing gcc compiler warning.

This has nothing to do with the ticket, but it is really annoying me.
Re #7845. Adding branch to get number of events in the box.
Re #7845. Fixing unit test.
Merge remote-tracking branch 'origin/feature/7845_bincount'