The +1/+1 counter is put on Slumbering Dragon before blockers are declared. This may allow Slumbering Dragon to "wake up" and block the creature that attacked and caused its ability to trigger.

Artwork
Loading artwork…
Slumbering Dragon
Magic 2013 · #148 · EN
Nonfoil—Foil—
Card rules
Flying
This creature can't attack or block unless it has five or more +1/+1 counters on it.
Whenever a creature attacks you or a planeswalker you control, put a +1/+1 counter on this creature.
3/3
Rare · Illustrated by Chris Rahn
Format legality
Commander Legal
Duel Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Penny Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Brawl Not Legal
Competitive Brawl Not Legal
Future Not Legal
Gladiator Not Legal
Historic Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
Pioneer Not Legal
PreDH Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Timeless Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
Slumbering Dragon's third ability will trigger once for each creature that attacks you or a planeswalker you control.
Slumbering Dragon's second ability counts all +1/+1 counters on it, not just the ones added by its third ability.