Hi there,
Try this out:
Step 1) Manually trigger a flow. (Or schedule it, whatever you need.)
Step 2) "Send an HTTP Request to SharePoint". (The fact that you're using OneDrive is fine. Go to your OneDrive, and note the full URL for the Site Address. You will need to copy / paste it in, as you see I did here. Use 'Documents' like I did for the URI.)
Step 3) Use a "Select". In the "From", click, then use the expression tab / fx and paste in this:
body('Send_an_HTTP_request_to_SharePoint')?['d']?['results']
Step 4) In the "Map" area, type in Name and Item Count, and opposite of them, again you'll enter an expression for each:
item()['Name'] and item()['itemcount']
When it's run at this point, our output looks like this:
Now you have an array that you can do anything you want with. If your output desire is a CSV, you can put that output into a "Create CSV Table", and then use the output from THAT in the "File Content" field inside of a "Create File" action for OneDrive. Just make sure the File Name is something like FileCount.csv -- and if you don't want the file renamed every time, you'll need a variable (date, time, something like that) in the file name.