Proving set of finite languages vs all languages over finite alphabet to be countable / uncountable
If the language is infinite, the word $\# w_1 \# w_2 \ldots$ would be infinite, and so doesn't map to an integer in any meaningful way.
Applying the diagonal argument on the set of all finite languages might (indeed, will) result in an infinite language.