When a resistor is used for measuring current, the power dissipated in it is I^2 R. ( Actually, this formula is always true, what I should really say is "The most useful formula for a current-sense resistor is..." )
In particular, a current measurement resistor should have a small voltage across it -- because if you have a 12 V circuit with a current-measurement resistor dropping 5V, then the circuit actually only sees 7V. So, as a rule of thumb, the current measurement resistor should have less (typically, much less) than a volt across it. If you're handling 5A, that means your current-measurement resistor will be dissipating less (/much less) than 5W.
( In particular, that circuit you posted will draw no more than 10 mA, so for an appropriately sized current measurement resistor, the dissipation will be less (/much less) than 0.05W, easily within the reach of a standard through-hole resistor. )