Merge pull request #305 from echampet/master

Use COUNT(*) / code style