Note: Information adapted from https://unix.stackexchange.com/questions/280532/m4-macro-implementation-of-global-non-volatile-counter
Markdown does not support auto numbering of sections :-(. However with some M4 magic and some minor changes to your markdown text you can add this handy feature.
The techinique uses the M4 macro processor maintain an auto incrmenting counter and add the correct section numbers to your markdown text.