Are the file returned in sorted order? If not, you have no way of reconciling the counts with file names. That may or may not be important.
I gave code that was equivalent to the OP's code, but it may very well be that your code is better.
In reply to Re^3: Make this simpler?
by ikegami
in thread Make this simpler?
by faozhi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |