- section ||= '/'
- subpages = resources_for(section, sort_by: :nav_order)
- subpages_count = resources_for(section, exclude_indexes: true).count

- unless subpages.empty?
  nav.glypto-nav ng-class="{'s-hidden' : hidden}"
    button.nav-toggle ng-click="toggle()"
    = link_to 'Glyptotheque', '/', class: '_logo'
    ul
      - subpages.each do |r|
        li(class="#{'s-selected' if r == current_page} #{'_index' if r.directory_index?}")
          - if r.directory_index?
            = link_to r.url
              = (r.data.title || resource_dir(r))
              span._count = subpages_count
          - else
            = link_to (r.data.title || resource_file(r)), r.url

- section ||= '/'
- subpages = resources_for(section, sort_by: :nav_order)

- unless subpages.empty?
  nav.glypto-nav ng-class="{'s-hidden' : hidden}"
    button.nav-toggle ng-click="toggle()"
    = link_to 'Glyptotheque', '/', class: '_logo'
    ul
      - subpages.each do |r|
        li(class="#{'s-selected' if r == current_page} #{'_index' if r.directory_index?}")
          - if r.directory_index?
            - subpages_count = resources_for(r.url, exclude_indexes: true).count
            = link_to r.url
              = (r.data.title || resource_dir(r))
              span._count = subpages_count
          - else
            = link_to (r.data.title || resource_file(r)), r.url

Fix nav sub pages counts
Fix nav sub pages counts

tyom/sculptor,tyom/sculptor