SharePoint Document Issues

SharePoint Item Child Count Excludes Nested Folders: Solutions

Muhammad TalhaMuhammad Talha Nov 2, 2026 868 views

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.

SharePoint Item Child Count Excludes Files in Nested Folders
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.
Before you start

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.

Solution 1Recommended

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.

1
Create a Custom Column

Navigate to your SharePoint document library, click 'Add column', choose 'Number', and name it 'Total Recursive Count'.

2
Build a Power Automate Flow

Go to Power Automate, create a new Scheduled Cloud Flow, and set it to run daily or weekly depending on your needs.

3
Retrieve Folder Contents

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.

4
Filter and Count Items

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.

5
Update the SharePoint Column

Add the 'Update file properties' action to write the calculated length integer back into your new 'Total Recursive Count' column.

Use Power Automate to Calculate a Recursive File Count
Performance Consideration: For exceptionally large document libraries, 'Get files' may run into pagination limits. Ensure you configure pagination settings in the action to handle large nested structures.
Free Microsoft Office alternative

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. 1. Download the Software: Visit the official WPS website and download the free desktop application for your operating system.
  2. 2. Sign In for Cloud Access: Create a free account to activate WPS Cloud, enabling seamless synchronization of your folders and files.
  3. 3. Organize Your Workspace: Easily drag and drop your nested folders into the WPS workspace to manage them without complex enterprise configurations.
Fully compatible with all Microsoft Office file formats, including .docx, .xlsx, and .pptx.Lightweight, all-in-one suite that handles Word, PDF, Excel, and PowerPoint in a single tabbed interface.Built-in WPS Cloud storage makes organizing and locating nested files and folders straightforward and intuitive.Completely free for basic and everyday document editing tasks.
QA img-9

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.