How to limit the number of documents in my document library

I want to restrict the number of documents that can be put in my Office 365 SharePoint library to 1000 so that I can keep the performance as high as possible.I cannot seem to find any way to restrict a document library to a number of documents so any help or advice would be appreciated.

Go4Sharepoint, is a Microsoft Featured Community.
Microsoft, Windows, Sharepoint, Sharepoint logo, Windows logo, etc are trademarks of the Microsoft Corporation.
All product names, logos, copyrights, and trademarks mentioned are acknowledged as the registered intellectual property of their respective owners. This site is not in any way affiliated with, nor has it been authorized, sponsored, or otherwise approved by, Microsoft Corporation.