updating number of buttons