When a creature "loses all abilities," this effect removes every ability the creature currently has, regardless of where those abilities originated. This includes abilities granted by keyword counters (such as a flying counter, deathtouch counter, or lifelink counter) placed on the creature. The counter remains on the creature physically, but the ability it was granting is removed by the "loses all abilities" effect for as long as that effect lasts.
This is because keyword counters work by granting abilities to the permanent they're on (CR 122.1a). Those granted abilities exist on the creature itself at the time the "loses all abilities" effect is applied. A continuous effect that removes all abilities strips them away regardless of their source — the counters are not a protected or separate layer of abilities.
Continuous effects that remove abilities are applied in Layer 6 of the layer system (CR 613.1f). Abilities granted by counters are also applied in Layer 6 (CR 613.1e). Since both effects operate in the same layer, timestamp order and dependency rules determine which applies last — meaning a "loses all abilities" effect with a later timestamp will overwrite the abilities granted by counters.
Concrete example: Your Grizzly Bears has a flying counter on it, giving it flying. Your opponent casts Sudden Spoiling, which makes all creatures lose all abilities. Even though the flying counter is still physically on the bear, it loses the flying ability for the duration of Sudden Spoiling's effect. Once Sudden Spoiling's effect ends, the counter begins granting flying again.
Note: if a new "loses all abilities" effect is applied before a keyword counter is placed (earlier timestamp), then the counter's granted ability would come after and the creature would retain that ability. The interaction is timestamp-sensitive within Layer 6 (CR 613.6).
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.