The queue for stale moves is exactly 9. For example, if you do an up smash it is now the most recent move you used and is number 1 in the queue. After nine more moves (assuming none of them were up smashes) the move will be out of the queue and fully refreshed in damage and in knockback.
Also, hitting shields and not hitting at all does not count as a move toward the queue. You actually have to do damage.
Also, I would assume every individual Pikmin latched on would count as an attack.
One Side B. One Pikmin. One Latch. One attack.
Makes sense to me.