  Determining the most general, consistent scalar tensor theory of gravity is
important for building models of inflation and dark energy. In this work we
investigate the number of degrees of freedom present in the theory of beyond
Horndeski. We discuss how to construct the theory from the extrinsic curvature
of the constant scalar field hypersurface, and find a simple expression for the
action which guarantees the existence of the primary constraint necessary to
avoid the Ostrogradsky instability. Our analysis is completely gauge-invariant.
However we confirm that, mixing together beyond Horndeski with a different
order of Horndeski, obstructs the construction of this primary constraint.
Instead, when the mixing is between actions of the same order, the theory can
be mapped to Horndeski through a generalised disformal transformation. This
mapping however is impossible with beyond Horndeski alone, since we find that
the theory is invariant under such a transformation. The picture that emerges
is that beyond Horndeski is a healthy but isolated theory: combined with
Horndeski, it either becomes Horndeski, or likely propagates a ghost.
