Fixed incorrect declaration of countBy function
Merge pull request #1961 from axefrog/master

Fixed incorrect declaration of countBy function