Fixed problem with counting number of rows for some SQL queries displayed in db pager.