Limit number of uploaded files

Hi, 

After looking over the code trying to figure out how to  support this feature, I've noticed that the work was already 99% done. It just needed to add configuration settings.

So here it is, I hope I did it right.