Hacks to get 'count(*)' working.