As per the FAQ page:
Is there a limit to how many trading cards can drop?
Most games will drop a number of cards equal to about half of the number of cards in that game's set of cards. For example, Half-Life 2 has 8 cards in its set, you can receive 4 card drops by playing it. You'll need to collect the other half of the set from other community members. Try the beta group discussions, community market, barter with friends, and trade discussions. You can check how many drops you have remaining on your badges page.
In the instance that a game has an odd number of cards, for example Counter Strike: Global Offensive - which has a total of five cards - the number of cards that you can collect is rounded up. This means that you can get three out of the five cards.
The drop limit is permanent and it will not reset.
However, there now is an additional way of gaining cards:
Booster packs: Booster packs are additional cards for games that will drop periodically. Anyone who has collected all the trading card drops they can for a game and have used Steam in the last week may receive one of these booster packs. These packs contain three additional cards for the game, and may contain foils. If you receive a booster, you will get a "1 new item in your inventory" alert.
These booster packs are randomly given out whenever a badge is crafted (as can be seen by the badge eligibility text below).
As for statistics, there is now also a "How do I earn card drops?" link on the badge progress:
![Drops](https://i.stack.imgur.com/LtnGy.png)
This then shows an overlay with additional information (what earned you card drops, in particular):
![Drop data](https://i.stack.imgur.com/3vPef.png)
Yes,I bought an item for Dota 2 online rather than in-game shop and my progress towards the card increased,don't see why it would be different for TF2.
When you buy items online the system asks you to log-in with your steam account to finish purchase;in-game store is essentially just a simple game web browser to display the original online store(Why?It is easier to maintain one store than 2).So in the end whether you buy something online or in-game it goes thru the same account and the same system.
Also the system is retroactive,meaning all things you bought before trading cards will be counted as you bought them now.So the system will checks your receits and they are the same for both stores.
If you want to check for yourself you don't have to spent 9$,you can purchase the cheapest item you find and then check if you "progress towards next card" has increased.
Best Answer
Just like many other games CS:GO drops cards if you purchased the game (which is not relevant since it is free for some time now) or spent some money on in-game purchases. This is what I see if I open my existing CS:GO badge:
So you need to spend about $9 to get a card.