All counters on a creature are considered when determining the value of X, not only +1/+1 counters.

Artwork
Loading artwork…
Nils, Discipline Enforcer
The List · #C21-20 · EN
Nonfoil—Foil—
Card rules
At the beginning of your end step, for each player, put a +1/+1 counter on up to one target creature that player controls.
Each creature with one or more counters on it can't attack you or planeswalkers you control unless its controller pays X, where X is the number of counters on that creature.
2/2
Rare · Illustrated by Magali Villeneuve
Format legality
Commander Legal
Duel Legal
Legacy Legal
Oathbreaker Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Brawl Not Legal
Competitive Brawl Not Legal
Future Not Legal
Gladiator Not Legal
Historic Not Legal
Modern Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
Penny 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
For each player, choosing a target creature that player controls is optional.
Your opponents can choose not to pay to attack with a creature with one or more counters on it that attacks "if able." If there's no other player or planeswalker to attack, the creature simply doesn't attack.