The answer depends on what model you're evaluating (as well as which coefficient and which effect you're referring to: unfortunately, neither is clear from your query).
In the simplest mediation model: A -> M -> Y, the correlation, r(M,Y) gives the standardized direct and total effect of the mediator, M, on Y (there is no indirect effect of the mediator in this model). Similarly, the correlation r(A,M) gives the direct and total effect of A on M.
There is an indirect effect of A on Y, which path rules tell us is the product of the A to M path coefficient multiplied by the M to Y path coefficient. In this model, that is the "total" effect of A on Y.
However, if the model changes so that you also allow a direct path from A to Y, then neither the direct nor the indirect effect of A on Y is necessarily equal to the total (unless one of the effects is zero). As well, if M influences some other variable (say, "X"), which in turn influences Y, then no single coefficient can capture the direct or total effect of M on Y.
No the coefficient for the total effect is the one where you exclude the mediator, say c'.
The coefficients when you include the mediator are the indirect effect, a*b, and the direct effect, C where a is impact of X on M and b the impact of M on Y in that model..
The two regressions are comparable such that
c' = c + ab.
That is the total effect from your first regression is the sum of the direct effect and indirect effect from the second model.