Would you mind creating and putting as the last function something like:

    function page() {
         Math.floor(self.table.rows.length / self.table.params.per_page) + 1;
    }