fix Model.countBy