Layer 7 handles power and toughness modifications and is divided into five sublayers applied in strict order: 7a (characteristic-defining abilities), 7b (setting effects, e.g. 'base power and toughness becomes X/Y'), 7c (effects that modify without setting), 7d (counters), and 7e (effects that switch power and toughness). Each sublayer's result feeds into the next.
Because sublayer 7b (setting effects) is processed before sublayer 7d (counters), any effect that sets a creature's power and toughness to a specific value is applied first, and then the bonus from +1/+1 or -1/-1 counters is added on top of that set value. Counters always contribute after the base is established by setting effects.
Concrete example: You control a Tarmogoyf (whose power/toughness is set in layer 7a as a characteristic-defining ability) and cast an effect that says 'target creature's base power and toughness becomes 2/2' (layer 7b). If Tarmogoyf also has two +1/+1 counters (layer 7d), the final result is 4/4: the 2/2 set in 7b plus 2/2 from the counters added in 7d.
This means counters are never 'wiped out' or ignored by a setting effect — they always stack on top of whatever base value was established. This is true even if the setting effect is applied after the counters were placed on the creature physically; layer ordering is about rules evaluation order, not time of application.
Relevant Comprehensive Rules: CR 613.3 (layer system overview) and CR 613.3e (sublayers 7a–7e), which specify that 7b (setting) precedes 7d (counters).
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.