SGF-172 - added support for countBy... methods