I am working on a project where in there requirement is like this.
We have 1 (Say Alpha) library where in users keep uploading the files on daily basis. Once the alpha library reaches 5000 files count, a new library should be created as (Beta1) and move the files from Alpha to Beta1 library. Beta1 should only store 5K files. Once the Beta1 also reached 5k and if the Alpha library reaches 5000 a new library with name Beta2 has to be created and move files from Alpha to Beta2. (Since Beta1 already have 5k files)
This has to be a continuous process and Alpha library should never cross 5000 documents in the library .
I have grabbed few powershell to count the files number and library creation. but that is manually running the powershell files.