From innite ergodic theory to number theory (and possibly back)