add 1 to your score in minecraft

I am making a map where you "capture" beacons (by placing stained glass on them) and your score should go up 1. So my question is: how do I add 1 to my scoreboard objective: "beaconscaptured"

I already know how to detect the block the command, so far is right here:

/execute @e[name=Beacon] ~ ~ ~ detect ~ ~1 ~ minecraft:stained_glass 0 `command`  

What do I put in place of command?


Solution 1:

scoreboard players add @p beaconscaptured 1

You might want to have a look at the command reference for the scoreboard, since those are very easy commands.