There are several intersting consequences of this abstract viewpoint about these formulas. I also would have liked to discuss why the coarea inequality is the backbone of the coarea formula, but let me answer the question for now!

Let us begin with the Euclidean fomulas. Federer proves in [Fe] the following area and co-area formulae (they are 3.2.3 and 3.2.11 in the book):

**Theorem (area Formula, Euclidean)** Suppose $m \leq n$ and $f:\mathbb{R}^m \to \mathbb{R}^n$ is Lipschitz. Then for any (Lebesgue) measurable set $ A \subset \mathbb{R}^m $,
$$
\int_A J_m f(x) \, d\mathcal{L}^m(x) = \int_{\mathbb{R}^n} \mathcal{H}^{0}(f^{-1}(z) \cap A) \, d\mathcal{H}^m (z) \, ,
$$
where $J_nf(x):= \left( \det (Df(x)^T Df(x))\right)^{1/2}$. (It is well-defined a.e. by Radamacher's differentiability theorem below.)

**Remark:** The notation $N(f,A,z)$ is probably more common for $ \text{card} \{ x \in A: f(x) = z\} $ than $ \mathcal{H}^{0}(f^{-1}(z) \cap A) $. However, note the analogy to the coarea formula below. In fact when $m=n$ the two theorems coincide.

**Theorem (Coarea Formula, Euclidean)** Suppose $m \geq n$ and $f:\mathbb{R}^m \to \mathbb{R}^n$ is Lipschitz. Then for any (Lebesgue) measurable set $ A \subset \mathbb{R}^m $,
$$
\int_A J_nf(x) \, d\mathcal{L}^m(x) = \int_{\mathbb{R}^n} \mathcal{H}^{m-n}(f^{-1}(z) \cap A) \, d\mathcal{L}^n(z) \, ,
$$
where the existence of $J_nf(x):= \left( \det (Df(x) Df(x)^T)\right)^{1/2}$ is guaranteed by Radamacher's differentiability theorem.

**Remark**: The Jacobians are well-defined thanks to the Rademacher's theorem:

**Theorem** (Rademacher, 1919): Let $f:\mathbb{R}^m \to \mathbb{R}^n$ be Lipschitz. Then $f$ is differentiable at $\mathcal{L}^m$-a.e. $x \in \mathbb{R}^m$.

**Remark**: Measurability and integrability of the functions involved are part of the claims of the theorems.

**Remark**: Via approximations by characteristic functions the formulas above yield, respectively, integral identities,
$$
\int_A \phi(x) J_m f(x) \, d\mathcal{L}^m(x) = \int_{\mathbb{R}^n} \left(\int_{f^{-1}(z) \cap A} \phi(y) \, d\mathcal{H}^{0}(y) \right) \, d\mathcal{H}^m (z) \, ,
$$
and
$$
\int_A \phi(x) J_nf(x) \, d\mathcal{L}^m(x) = \int_{\mathbb{R}^n} \left(\int_{f^{-1}(z) \cap A} \phi(y) \, d\mathcal{H}^{m-n}(y) \right) \, d\mathcal{L}^n(z) \, ,
$$
for integrable $[-\infty,+\infty]$-valued functions $\phi$ defined on $\mathbb{R}^m$, i.e. the domain space in the context of area/coarea formula. Note that
$$
\int_{\mathbb{R}^n} \left(\int_{f^{-1}(z) \cap A} \phi(y) \, d\mathcal{H}^{0}(y) \right) d\mathcal{H}^m (z) = \int_{\mathbb{R}^n} \left(\sum_{y \in f^{-1}(z) \cap A} \phi(y) \right) \, d\mathcal{H}^m (z) \, .
$$
A detailed proof of these theorems can be found in Evans and Gariepy's book. [E-G]

In [Fe] these theorems were generalized to maps between Riemannian manifolds and maps between rectifiable subsets of Euclidean spaces.

**Definition (Rectifiable Sets)**: A subset of a metric space $(X,d)$ is said to be (countably) $\mathcal{H}^k$-rectifiable if, up to a set of $\mathcal{H}^k$ measure zero, it is a countable union of images of Lipschitz maps from subsets of $\mathbb{R}^k$ to $X$. Informally, they are the "manifolds" of geometric measure theory!

In 1994 Kirchheim [Kir] introduced the notion of "metric differentiability" for maps $\mathbb{R}^n \to (X,d)$ where $X$ is a metric space. The metric derivative of $f$ at $x$, denoted $mdf(x)$ is a seminorm on $\mathbb{R}^n$. Kirchheim also defined a "Jacoian" for such seminorms. He then proved the following area formula:

**Theorem (Kirchheim, area formula)**: Let $ f: \mathbb{R}^n \to (X,d)$ be a Lipschitz map into a metric space. Then for any measurable subset $ A \subset \mathbb{R}^n $,
$$
\int_A J_n(mdf(x)) \, d\mathcal{L}^n(x) = \int_X \mathcal{H}^0(f^{-1}(z) \cap A) \, d\mathcal{H}^n(z) \, .
$$
Of course, again, one easily deduces a change of variables formula from this.

Using the same notion of metric derivative, Karmanova [Kar], and later, independently, Reichel [Rei] defined a coarea factor $C_k(mdf(x))$ and with that proved the following coarea formula.

**Theorem (coarea formula)**: Suppose $(X,d)$ is an $\mathcal{H}^k$-$\sigma$-finite metric space, $A \subset \mathbb{R}^{n}$ is measurable, and $ f:A \to X $ is Lipschitz. Then,
$$
\int_{A} C_k(mdf(x)) \ d\mathcal{L}^{n}(x) = \int_{X} \mathcal{H}^{n-k}(f^{-1}(z) \cap A) \, d\mathcal{H}^k(z) \, .
$$
And again it generalizes to a formula involving integration of scalar functions. Reichel also generalizes the theorem to $\mathcal{H}^n$-rectifiable metric spaces in place of $\mathbb{R}^n$.

Let $X$ and $Y$ be separable metric spaces, and let $S \subset E$ be (countably) $\mathcal{H}^n$-rectifiable. For a Lipschitz map $f:S \to Y$, Ambrosio and Kirchheim [A-K] define a notion of "Tangential differential", denoted by $d^Sf(x)$, and then its "Jacobain" $J_n(d^Sf(x))$. They prove then

**Theorem (Area Formula)**: Let $f:X \to Y $ be a Lipschitz function, and let $ S \subset X $ be a (countably) $\mathcal{H}^n$-rectifiable subset. then for any Borel function $\phi:S \to [0,\infty]$,
$$
\int_S \phi(x) J_n (d^S f(x)) \, d\mathcal{H}^n(x) = \int_{Y} \left( \int_{f^{-1}(z) \cap S)} \phi(y) \, d\mathcal{H}^{0}(y) \right) \, d\mathcal{H}^n (z) \, ,
$$

They then turn to the coarea formula. Let $S$ be an $\mathcal{H}^n$-rectifiable subset of a metric space, and $f:S \to \mathbb{R}^k$ be Lipschitz, where $ n \geq k$. In [A-K], they define a notion of for such maps, denoted by $d^Sf(x)$, and then its "Jacobain" $C_k(d^Sf(x))$. (The letter $C$ is for the *coarea factor*, a term many authors use in place of Jacobian in the context of the coarea formula.) Using this they prove

**Theorem (coarea formual)**: Let $S$ be an $\mathcal{H}^n$-rectifiable subset of a metric space, and $f:S \to \mathbb{R}^k$ be Lipschitz, where $ n \geq k$. Then for any Borel function $\phi:S \to [0,\infty]$,
$$
\int_S \phi(x) C_k(d^Sf(x)) \, d\mathcal{H}^n(x) = \int_{\mathbb{R}^k} \left(\int_{f^{-1}(z)} \phi(y) \, d\mathcal{H}^{n-k}(y) \right) \, d\mathcal{L}^k(z) \, .
$$
The proof uses the classical/Euclidean coarea formula.

Magnani [Mag] has investigated the area and coarea formulae in the context of sub-Riemannian manifolds, Carnot groups, and especially Heisenberg groups. We state only one result. The following is corollary 6.5.4 in Magnani's thesis [Mag]. (Be wary of Magnani's notation where he uses $\mathbb{H}^{2n+1}$ to denote the Heisenberg group of *topological* dimension $2n+1$.)

**Theorem (coarea formula on Heisenberg group)**: Let $ u : \mathbb{H}^{2n+1} \to \mathbb{R}$ be a Lipschitz map. Then for any non-negative measurable function $ h: \mathbb{H}^{2n+1} \to \mathbb{R}$,
$$
\int_G h \, |\nabla_H u| = \frac{\alpha_{Q-1}}{\omega_{Q-1}} \int_{\mathbb{R}} \left( \int_{u^{-1}(t)} h \, \, dS^{Q-1} \right) dt
$$
where $Q=2n+2$ is the Hausdorff dimension of $\mathbb{H}^{n}$, $\nabla_H u $ is the *horizontal gradient*, $S^{Q-1}$ is the spherical Hausdorff measure (with respect to Carnot-Caratheodory distance), and $\alpha_{Q-1}$ and $\omega_{Q-1}$ are (computable) dimensional constants.

**References**

[Fe]: H. Federe, Geometric Measure Theory

[E-G]: Lawrence C. Evans, Ronald F. Gariepy: Measure theory and fine properties of functions

[A-K]: Luigi Ambrosio, Bernd Kirchheim, Rectifiable sets in metric and Banach spaces, Math. Ann. 318, 527–555 (2000)

[Kir]: Bernd Kirchheim, RECTIFIABLE METRIC SPACES: LOCAL STRUCTURE AND REGULARITY OF THE HAUSDORFF MEASURE, PROCEEDINGS OF THE AMERICAN MATHEMATICAL SOCIETY Volume 121, Number 1, May 1994

[Kar]: Karmanova, Rectifiable sets and coarea formula for metric-valued mappings, Journal of Functional Analysis, Volume 254, Issue 5, 1 March 2008, Pages 1410-1447

[Rei]: (Doctoral Thesis) Reichel, Lorenz Philip, The coarea formula for metric space valued maps, 2009 https://doi.org/10.3929/ethz-a-005905811

[Mag]: Valentino Magnani, Elements of Geometric Measure Theory on sub-Riemannian groups