IMPORTANT: To do this you must be the OWNER of the Sharepoint Site you want to work on. 


Overview

To see how many files and folders are in a document library we will add 2 columns to the document library default view. Those columns are called Item (file) Child Count and Folder Child Count.


Steps

Go to the target Sharepoint site.


Navigate to the document library for which you want to see the number of files and folders. Click on any of the column headers within the document library then click column settings > Show/hide columns. In this example the document Library is called "Documents":


Tick the box beside the columns Item Child Count and Folder Child Count, then click Apply:


You will now see the  Item (file) Child Count and Folder Child Count columns appear in your default document library view, showing the total of files and folders. You only need to do this once per document library and ALL folders within the selected document library will also show these columns too:


Here is another folder in the same document library also showing these columns too:


You can also rename the columns by clickung on the column header > Column settings > Rename. In this example I have renamed the Item Child Count column heading to Files:



After also renaming the Folder Child Count to Folders, here is the final view: