Counting outs
There are four copies of every tile. If you wait on 3 and 6 of bamboo and can see two 3s and one 6, at most five winning tiles remain. Counting this way tells you how good your wait really is.
What you can see
Your own hand, all discards, all exposures and any revealed indicators. In riichi, dora indicators also remove tiles from play. Tiles in opponents' hands are unknown, which is why counting gives estimates, not certainties.
Using counts
Prefer waits with more unseen tiles, and prefer tiles opponents are less likely to need. Honours that have been discarded twice are often good waits late in the hand.
Do not overdo it
Exact probability is less useful than quick estimates. Practise until counting your outs becomes automatic.