SharePoint Item Child Count Excludes Nested Folders: Solutions
Question details
The SharePoint Item Child Count column displays a count of zero for parent folders containing nested files, as it fails to calculate recursively.

- Product
- Microsoft SharePoint
- Device & OS
- not provided
- Scenario
- A user is viewing a SharePoint document library and trying to see the total number of files contained within a parent folder that has multiple subfolders.
- Observed behavior
- The Item Child Count column only counts files located directly inside the current folder. If a parent folder only contains subfolders, it displays a zero count, completely ignoring the files stored deeper in the nested folder structure.
Because this is the expected default behavior of SharePoint, prepare to use administrative tools like Power Automate or PowerShell, which require appropriate site permissions to implement.
Use Power Automate to Calculate a Recursive File Count
Since SharePoint does not natively count files in nested folders, you can build a Power Automate flow to traverse the subfolders and update a custom column with the accurate total.
This approach requires creating a custom Number column in your document library to store the recursive count. Power Automate will run on a schedule or trigger to recount the items.
Navigate to your SharePoint document library, click 'Add column', choose 'Number', and name it 'Total Recursive Count'.
Go to Power Automate, create a new Scheduled Cloud Flow, and set it to run daily or weekly depending on your needs.
Add the 'Get files (properties only)' action for SharePoint. Configure it to point to your Site Address and Library Name. Set the 'Limit Entries to Folder' to your specific parent folder.
Use a 'Filter array' action to exclude subfolders (filtering where 'IsFolder' is equal to false). Then, use a 'Length' expression to count the remaining file items.
Add the 'Update file properties' action to write the calculated length integer back into your new 'Total Recursive Count' column.

Use PnP PowerShell for Ad-Hoc Recursive Counts
If you do not need a constantly updated column in the SharePoint UI, you can run a PnP PowerShell script to calculate the recursive child count on demand.
Simplify Document Management with WPS Office
Enterprise tools like SharePoint often require complex workflows and coding just to perform simple tasks like counting files. If you are looking for a more streamlined, user-friendly way to manage, edit, and collaborate on your daily documents, WPS Office is an excellent free alternative. It offers powerful file management capabilities without the steep learning curve.
- 1. Download the Software: Visit the official WPS website and download the free desktop application for your operating system.
- 2. Sign In for Cloud Access: Create a free account to activate WPS Cloud, enabling seamless synchronization of your folders and files.
- 3. Organize Your Workspace: Easily drag and drop your nested folders into the WPS workspace to manage them without complex enterprise configurations.

Frequently Asked Questions
Why does the Item Child Count column show zero when there are files in subfolders?
This is the intended behavior in SharePoint. The 'Item Child Count' column only measures items located at the root level of the specific folder you are viewing. It deliberately does not perform a recursive scan of items buried within its subfolders.
Can I change a SharePoint setting to make the count recursive automatically?
No, there is no out-of-the-box setting or toggle in the SharePoint user interface to alter this behavior. You must rely on custom developmental solutions like Power Automate, PnP PowerShell, or the Microsoft Graph API.
Will removing and re-adding the Item Child Count column fix the issue?
No. Removing and re-adding the column simply resets the view, but the underlying logic remains the same. The column will continue to only display the count of direct child items.




