I am able to list all the directories by
find ./ -type d
I attempted to list the contents of each directory and count the number of files i
Assuming you have GNU find, let it find the directories and let bash do the rest:
find . -type d -print0 | while read -d '' -r dir; do files=("$dir"/*) printf "%5d files in directory %s\n" "${#files[@]}" "$dir" done