gracefully handle errors from COUNT query

- any error from the SQL query would cause exception to be raised rather
	than calling back with the error and giving the caller the opportunity
	to handle it.
Merge pull request #10 from aarongowatch/master

Fix COUNT error handling