Each of the four buttons can only be used to perform one action. Assuming you want to be able to turn on and off any given lights/rooms: two. One button to turn on a set of lights, and second button to turn off the same lights; the third and fourth for a second group of lights.
If you want to use one button to turn on (or off) 3 groups of lights and the other 3 buttons to perform the counter action of the first, you can control 3 rooms of lights.
If you have more than three rooms in the hue app and want to control all the lights, you can select "home," but you are limited to the built-in scenes (bright, dim, off, etc.).