Most players simply count outs as any card that will improve their hand. Much care should be applied here and in order to stay realistic we should only count cards that will improve our hand to the best hand. This is just good solid poker strategy. In Texas Holdem & other games. The last thing you want to be doing is counting a card that will improve your hand but be a loser overall.
For example, if I hold an open ended straight draw I have 8 cards that improve my hand. But if there are 2 suited cards on the flop then I may only have 6 real drawing cards. Since 2 of the 8 cards that will make my straight could potentially make someone a higher hand (a flush).
There are many possible situations this could apply to and use honest judgment when counting cards that will help you.