SharePoint has some basic functionality for showing the number of items in folders. These are columns that already exists in your library--you just have to display them in the view.
- In your library, click on the All Documents view (on the right) and select Edit current view.
- You can also select any current column heading, then select 'Column Settings'-'Show/Hide Columns'
- Select File Size, Item Child Count, or Folder Child Count and to have them show up as columns in the view.

3. Scroll down and select OK.
- File size: does a complete count of all items (folders and files). At the document level, this will switch to showing individual file size
- Item child count: only counts files
- Folder child count: only counts sub-folders
To see the total number of items (files and folders) in a document library, select the Gear icon (top right) > Site Contents and scroll down.
