SQL_Model: count() and sum() rewrite
Merge pull request #372 from DarkSide666/patch-1

SQL_Model: count() and sum() rewrite