Is 9999 coins a hard limit?
Solution 1:
9999 coins is a hard limit.
To test this, I got 9999 coins from Luigi’s Balloon Hunt. I then continued to collect more coins, which did not increase the counter.
Spending 10 coins to try hunting another balloon left me with 9989 coins. After collecting past the cap again, buying the skeleton costume for 9999 coins left me with 0 coins.