How to limit number of result per page

What is a good way of taking say 200 record results and limiting it to 40 per page.?