Are you trying to restrict the number of rows returned to the first 5, or are you having an issue with pagination ?
If pagination, you can open up the repeat region server behavior and choose to show all records or choose to show 5 (or whatever) records at a time