1. Qi is the amount of games played.
You get it whether you win or lose, only draws don't count.
You need a certain amount of it to buy certain items, for example pure requires 10k qi.
Qi isn't used up when buying things that need qi.
2. Stock is the amount of an item the torishop has to sell.
Some items get more stock when they become sold out, while others don't.
As a general rule items with no qi usually get restocked, while items with qi don't.
The rule doesn't work with all items though, items like hunter (Which has no qi) don't get restocked to keep it rare.