GROOVY-5924: add @ClosureParams and tests for DGM#countBy methods