"How many games did you buy?"
I missed the "le" the first time too. It is to indicate the action happened in the past. The key here is the "did" in the English question, as opposed to "are" or "will".
That's not exactly right...well it's really not right at all. 了 isn't used to indicate past tense. It's to indicate change. So get that past tense stuff outta your brain
The games have already been purchased: the action is complete and therefore you use the completed action marker, 了, after the verb 買 ( 买 ).