Start by visualising it geometrically. The function on the unit square is 1 on the diagonal y=x and 0 everywhere else. Now think about integration with respect to the two measures. When you integrate a function f(x,y) with respect to you are taking the Lebesgue integral of f as a function of x, keeping y constant. In particular, (because for almost all x). But when you integrate a function f(x,y) with respect to you are taking the integral of f (as a function of y) with respect to counting measure, keeping x constant. In particular, (because when y=x, and at all other values of y).

Therefore , but .

Now what about the integral with respect to the product measure, ? If this were finite then Fubini's theorem would say that it must be equal to both of the above repeated integrals. But those two integrals are different, so the conclusion must be that is not finite.