Two rows hold 1 to N twice over, so together they add up to double a single row. On a 6×6 that's 21 + 21 = 42.
4×4 → 20 · 5×5 → 30 · 6×6 → 42
A cage that crosses between the two rows can't be counted in either row alone, but it fits neatly inside the pair. When cages cover both rows except one cell, subtract to find it.