fix to query count when having clause is present
Merge branch 'master' of ssh://manifestwebdesign.com:2200/dabl