HI Nikhil! I had the same issue and the only thing that worked for me was to create a non persistable entity with a boolean atribute that set its value by counting if the the data is more than a certain number, set that attribute to true and in the template, condition that page break according to this boolean attribute with conditional visibility. Not the best approach but it worked for me.
Hope it helps