A button can have other user defined attributes, so you can have the name of the label to be updated for example. You can also assign button a name, and then define the label name as the same as the button name, except with Label at the end...
def button_action(sender):
labelName=sender.name+'Label'
sender.parent[labelName].text= str(int(sender.parent[labelName].text)+1)
V=ui.View()
B=ui.Button(title='center', name='center')
L=ui.Label(text="0", name='centerLabel')
B.action=button_action
# ...
Or you could even store the label itself as an attribute of the button...
def button_action(sender):
sender.label.text= str(int(sender.label.text)+1)
V=ui.View()
B=ui.Button(title='center', name='center')
L=ui.Label(text="0", name='centerLabel')
B.label=L
B.action=button_action
# ..
Alternatively, store the number as a custom button attribute, and have a separate function that updates all of the labels.
Eg. The action would simply be:
sender.count+=1
update_labels()
Then a separate function that maps each label to each button value.