Numbered Headings works with the default Confluence export.

Default Confluence export

When you export a single page, the headings will be numbered the same as on your Confluence page.
When you export a document with multiple pages, the numbering will continue across these pages. See the Confluence documentation on exports for more information.