I was working on an IT Help Desk application when I encountered an interesting challenge.
We were using Power Automate to fetch data from a SharePoint list and display it in a Power App. In our case, we wanted to show the total ticket count directly in the app.
At that point, our SharePoint list already had over 7,000 records, and I needed a quick way to determine how many items were present.
I then test both approaches using the Get Items action and the SharePoint REST API to determine which one provides the count more quickly and efficiently.
In this tutorial, I’ll show you how to quickly count items in any SharePoint list or document library using Power Automate, and also compare the performance of both methods so you can choose the best one for your scenario.
Count Items in SharePoint List/Library Using Power Automate
For this example, I created a sharepoint list which contains 11152 records.

Method 1: Using the Get items Action
- Go to Power Automate and create an Instant Cloud Flow. Choose Manually trigger a flow (for testing).
- Search for Get items (SharePoint). Then select your Site Address and List Name.

- Add a Compose action and enter this expression:
length(body('Get_items')?['value'])

Save and run the flow. Then you’ll notice that the Get items action only retrieves 100 items by default, even though the list actually contains 11,152 records.
That’s because the default item limit for the Get items action in Power Automate is 100 items.

To get more, you’ll need to enable Pagination. To do this, follow the steps:
- Click on the Get items action.
- Go to the top-right corner and select Settings.
- Turn on the Pagination option.
- Set the Threshold limit to a higher value, for example, 20000.

Save and run the flow again.
Now, you’ll get all 11152 records, and the Compose output will correctly show 11152.

However, as you’ll notice, this approach takes more time to execute because it retrieves every single record to count them.
That’s why I tried a faster method using the SharePoint REST API.
Method 2: Using the SharePoint REST API
- Go to Power Automate and create an Instant Cloud Flow. Choose Manually trigger a flow.
- Then add a Send an HTTP request to SharePoint action from sharePoint Connector with the below parameter:
- Site Address: Provide the Site URL dynamic content.
- Method: GET
- URI:
_api/web/lists/getbytitle('Your List Name')/ItemCount

- Add a Compose action and use the expression below to extract the item count:
body('Send_an_HTTP_request_to_SharePoint')?['d']?['ItemCount']

Save and run the flow. This time, you will quickly get the total item count even if your list has over 10,000 records without loading all the data.

Now you know that using the REST API is the fastest way to get the total item count in Power Automate. But keep in mind, this method only returns the count.
If you need to retrieve actual item data along with specific columns, check out my tutorial on Get All SharePoint List Items using REST API Pagination in Power Automate.
I hope you found this article helpful.
You may also like the following Power Automate tutorials:
- Check If a Field Is Blank in Power Automate
- Send Email Using REST API in Power Automate
- Check If an Input String Is an Integer Using Power Automate
- Create a SharePoint Site Using Power Apps & Power Automate
- Delete Files From SharePoint Document Library Using Rest API in Power Automate

Hey! I’m Bijay Kumar, founder of SPGuides.com and a Microsoft Business Applications MVP (Power Automate, Power Apps). I launched this site in 2020 because I truly enjoy working with SharePoint, Power Platform, and SharePoint Framework (SPFx), and wanted to share that passion through step-by-step tutorials, guides, and training videos. My mission is to help you learn these technologies so you can utilize SharePoint, enhance productivity, and potentially build business solutions along the way.