You could use `find` and `uniq` for this, e.g.:
$ find . -type f | sed 's/.*\.//' | sort | uniq -c
16 avi
29 jpg
136 mp3
3 mp4
Command explanation
* `find` recursively prints all filenames
* `sed` deletes from every filename the prefix until the file extension
* `uniq` assumes sorted input
* `-c` does the counting (like a histogram).