Option to autohide the navigation footer

I've moved `getPageCount()` before the .helpers definition, so the `showNavigation` helper could use it. But that meant checking against a `{}` argument (line 137). Is there a better way to reuse `getPageCount()`'s code instead of copy/pasting it in `showNavigation`?