Minecraft wiki entry for scoreboard, associated text: Syntax
scoreboard players add <targets> <objective> <score> (Java Edition)
scoreboard players add <player: target> <objective: string> <count: int> (Bedrock Edition)
Description
Increments the targets' scores in that objective by the given amount.
Arguments
JE: <targets>: score_holder
BE: player: target: WildcardCommandSelector<Actor>
Specifies the score holders.
Must be a selection of score holders. It may be either a target selector, a player name, a UUID‌[Java Edition only], a unique ID of an entity‌[Bedrock Edition only], or * for all score holders tracked by the scoreboard. Named player needn't be online, and it even needn't be a real player's name.
JE: <objective>: objective
BE: objective: string: basic_string
Specifies the objective.
In Java Edition, it must be an valid scoreboard objective name. In Bedrock Edition, it must be either a single word that isn't a number (allowed characters: -, :, ., _, A-Z, a-z, and 0-9) or a double-quoted string.
JE: <score>: integer
BE: count: int: int
Specifies the score to set to.
Must be a 32-bit integer number. In Java Edition, it must be between 0 and 2147483647 (inclusive). In Bedrock Edition, it can be a negtive number that means decrementing the score.
Result
Command Trigger Java Edition Bedrock Edition
... add ... the arguments are not specified correctly Unparseable Failed
the objective doesn't exist Failed
<targets> or player: target fails to resolve to one or more score holders
the objective isn't writable N/A
On success Add the score value.
Output
Command Edition Situation Success Count /execute store success ... /execute store result ...
... add ... Java Edition On fail 0 0 0
On success 1 1 the sum of the objective's score value of each target after execution
Bedrock Edition On fail 0 N/A N/A
On success 1 N/A N/A