The bug
When a /clear command targets multiple players, it can succeed for some but fail for others. In this case, the feedback message incorrectly shows the number of players that were targeted, rather than the number that had matching items.
How to reproduce
Have two players in the world
/give @p tnt/clear @a tnt
Expected result
Should say “Removed 1 item(s) from player (your name)”
Observed result
Says “Removed 1 item(s) from 2 players”
Notes
The result of the command is the total number of items that were cleared. It appears in the feedback message correctly.
This issue was split from MC-122717
This was also fixed in 26.3-snapshot-1