Issue #127: Fix count query.