Fix count query issue
fix unit tests
fix left join queries
clear commented lines
Merge pull request #62 from kodify/KM-407

Fix count query issue