Strong epimorphisms and regular epimorphisms are two important classes of morphisms, and they do not coincide in general. Yet, in a locally presentable category, it is known that any strong epimorphism can be decomposed into a transfinite composite of regular epimorphisms. In this paper, we provide two syntactic methods to determine how many regular epimorphisms are needed in such a decomposition, using partial Horn theory and generalized algebraic theory. We start by discussing a general problem of decomposing a morphism into a transfinite composite of morphisms in a given class, which also covers the decomposition of an adjoint functor into monadic functors.