code: def stats_compute(self, *args, **kwargs):
          
          totalElements   = 0
          totalKeys       = 0
          totalSize       = 0
          l_stats         = []
          d_report        = {}
  
          for k, v in sorted(self.d_inputTreeCallback.items(), 
                              key         = lambda kv: (kv[1]['diskUsage_raw']),
                              reverse     = self.b_statsReverse):
              str_report  = "files: %5d; raw size: %12d; human size: %8s; %s" % (\
                      len(self.d_inputTree[k]), 
                      self.d_inputTreeCallback[k]['diskUsage_raw'], 
                      self.d_inputTreeCallback[k]['diskUsage_human'], 
                      k)
              d_report = {
                  'files':            len(self.d_inputTree[k]),
                  'diskUsage_raw':    self.d_inputTreeCallback[k]['diskUsage_raw'],
                  'diskUsage_human':  self.d_inputTreeCallback[k]['diskUsage_human'],
                  'path':             k
              }
              self.dp.qprint(str_report, level = 1)
              l_stats.append(d_report)
              totalElements   += len(v)
              totalKeys       += 1
              totalSize       += self.d_inputTreeCallback[k]['diskUsage_raw']
          str_totalSize_human = self.sizeof_fmt(totalSize)
          return {
              'status':           True,
              'dirs':             totalKeys,
              'files':            totalElements,
              'totalSize':        totalSize,
              'totalSize_human':  str_totalSize_human,
              'l_stats':          l_stats,
              'runTime':          other.toc()
          }
docs: Simply loop over the internal dictionary and
          echo the list size at each key (i.e. the number
          of files).