Update count functionality to work around group_by alias bug
Merge branch 'group_by_alias_workaround'