Fixed computation of page count in object 'pagination'