Fix count() with group by