ADD - added a method selectCountWithExtraQuery()