Dataset.getTotalCount is not working

Hi
Onready has been removed but I do not need any condition to get total count . When user clicks find button, findSchedules function will add filters to the dataset and get the count. It is such a simple one and taking me ages to solve. Could you pls help ? thanks