Please don't question my curiosity.
Took the data from the source and copied the data from the Moveset tab. Mirrored cells that only started with 'TM' so that I had a spreadsheet with just TM moves. Counted number of text cells per row (i.e. number of TMs per Pokemon) and find the average of all these totals. Also got rid of a few Pokemon entries that were basically duplicate entries (such as Wishiwashi and Wishiwashi (School Form) - they obviously learn the same amount of TMs).
On average, a Pokemon can learn ~32 TMs. The actual value was 31.4616307.
Hope I helped. :) Source