Translation:When you are angry you need to count to ten.
In German you don't distinguish between the two, as "wenn" means both "if" (hebrew אם) and "when" (כש). So it is better to use English as a reference here. The sentence could be expressed either way, with an "if" or with a "when". But there is a different nuance: using "if" you do not assume that the condition you are stating is necessarily going to be fulfilled, whereas using "when" you imply that the condition will be or was or is fulfilled, and its fulfillment is Just a matter of time.