Let $\lambda=(\lambda_1,...,\lambda_n)$ be a partition. My goal is to prove the following formula $$\sum\limits_{x\in\Lambda}(h(x)^2-c(x)^2)=|\lambda|^2,$$ where for $x=(i,j)\in\Lambda:=\{(i,j)\in\mathbb{Z}^2 :\ 1\le j\le \lambda_i \}$ we define $$h(x)=\lambda_i+\lambda_j'-i-j+1,$$ $$c(x)=j-i,$$ $$|\lambda|=\lambda_1+...+\lambda_n,$$ and $\lambda_j'=\mathrm{card}\{j: \ \lambda_j\ge i\}$.
I did it by a straightforward calculation (using induction), but I found an information that it is possible to do it in a purely combinatorial way. I will be very grateful for any hint how to see this formula without tedious calculations.
Initialize a counter $c_{i,j} ← 0$ for each $(i, j) ∈ Λ$. Then for each ordered pair $((i_0, j_0), (i_1, j_1)) ∈ Λ^2$:
In total, each $c_{i,j}$ was incremented by
Adding these, we see that $c_{i,j}$ simplifies to exactly $h(i,j)^2 - c(i, j)^2$. But the sum of all counters must be $|λ|^2$ since we increased it by $1$ from each pair.