Limit dataset display by Code

Hello, I already get all the items on the dataset, it does shuffle on the real page, but the problem is it shows all 5 items, not 3 items only