fixed count bug on manual query paging