test for count/countBy