Over 260 scripts for SharePoint Online (SPO), OneDrive for Business, and SharePoint Server. The samples fix issues, provide reports and extra settings not available via UI. The scripts use Powershell, C#, CSOM and REST. They include copies of existing scripts from Technet Gallery years 2013-2019. >>> Scroll down to see the full index
https://github.com/PowershellScripts/AllGalleryScriptsSamples/blob/f8a1f9eb735127f8f86cb7eb42999c47c75065d4/File%20Management/Powershell%20cmdlet%20for%20getting%20the%20number%20of%20files%20in%20a%20folder/GetSPOFolderFilesCount.psm1#L1