Limit the amount of button block in homeneed change

Hello everyone…
I want to ask for your help. Thank you for all the help you can.
I bought a very interesting platform. I am not a developer, however I have been modifying step by step each of the necessary files. But I’ve reached my limit, I can not go any further.

The thing is that I can not limit the blocks of buttons, I can not find the way to do it.

Somebody could help me?.

I give two examples. The correct one and the one that I must correct.

Thank you.