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.