Limit dataset display by Code

Everytime i refresh the page it shuffles, but i wanted to display 3 items only not 5, any suggestions?