PowerPoint 2016 - Do not enumerate hidden slides
You'd need to create the slide numbers yourself (or by using a bit of VBA) rather than using PowerPoint's own slide numbering.
As Steve Rindsberg said, you may use such a VBA macro as found here: VBA : Number the slide if they are visible
The necessary steps for me were
- saving the presentation in with-macros-format (as a file with dot-pptm ending)
- pressing Alt + F11 (or on mac hit menu Tools → Macros → Visual Basic Editor)
- entering the code from aforementioned Stack Overflow answer
- pressing either F5 or the green run arrow