I heard that the game keeps track of the last 10 attacks you made (since you were spawned). This list of maximal size 10 seems to influence to damage a certain attack does. This forces the players to use diversity because using the same attack move all the time will not deliver as much damage.
However, how does this really work? I see three sub-questions to this:
Is a certain move (e.g. Up+B) represented maximally once in the list, or will every time it is executed push it onto the list (i.e. has the list a set characteristic or not?)
More to the point, if I execute the same move 10 times, will all other moves be purged?
When are attack moves different? If I hit different keys? What if I hit A on the ground and then once while in mid-air. Are these two different items or just one (the relevance of this distinction depends on the answer to question 1)?
When does an attack count towards the list? If I actually hit an opponent? What if I miss entirely? What if I hit a shield?
You have the basic idea right: the game keeps track of the last 9 moves you connected with. From SmashWiki's article on stale-move negation, basically:
When a move hits something, the move is put in the stale queue.
The next time you use the move, its damage is reduced based on how often and how early it appears in the queue. Using it twice in a row results in dealing 0.9x damage, for example, while if it's only in the last spot it'll deal 0.98x damage. If the queue is full of the move (you're using it for the tenth time in a row), it'll only deal 0.46x damage - this drastically affects its knockback as well.
If the move is fresh (not in the queue at all) it'll deal 1.05x damage. So most moves in the game doesn't actually ever deal integer damage.
To answer your questions specifically:
Yes, as stated above there is no limit to how many times a move can be in the queue.
The buttons you press are irrelevant, what matters is what move comes out. All characters have 8 ground attacks, 5 aerial attacks, a pummel, 4 throws, and 4 special moves. (I'm kind of confused about how you worded this one.)
If the move doesn't hit anything it doesn't count. If it hits an opponent or other damagable thing, it counts. Shields/invincible opponents I'm not 100% sure but I don't think they count.
A few bonus points:
Most single-player modes have stale-move negation turned off, including Training.
Some moves are immune to stale-move negation, like Zero Suit Samus's neutral air. Some of them are intentional; others are not.
If you interrupt certain moves with themselves (i.e. use it repeatedly without letting the animation finish), all the hits will be put in the queue, but they won't be "applied" until you do something else, so they'll deal full damage each time before dealing a lot less afterward. Marth and Meta Knight's down tilts are good examples of this.