#!/usr/bin/env python
import os

dirs = os.listdir('.')
subtotal = 0
max_file_folder = ''
max_file = 0

for DIR in dirs:
    if not os.path.isdir(DIR):
        continue
    cpt = sum([len(files) for r, d, files in os.walk(DIR)])
    subtotal += cpt
    print "{0}: {1}".format(DIR, cpt)
    if cpt > max_file:
        max_file = cpt
        max_file_folder = DIR
print '================================='
print 'SubTotal = {0}'.format(subtotal)
print '1st File Count path = {0}: {1}'.format(max_file_folder, max_file)

