Actually as described this is pretty simple to do with a 3 part workflow that takes just a minute to setup and then conditional rule(s) to automate.
I don’t know if this is something you will want to implement but it works. Had fun playing with it.
To set up the workflow you will need the entry id of the folder that you want renamed/updated with the count. ( This can be found in the column headings of the repository display )
Next create a workflow with 3 parts: ( do not rename any of the activities )
1. Search Repository
2. Second Search Repository
3. Rename Entry
In the first Search Repository activity enter for the search query:
{LF:Name="*", Type="DF"} & {LF:ID=XXXXX}
Replacing the XXXXX with the folder Entry ID value.
If you test this search it should only ever come back with one result, that of the folder that we will be renaming. We are doing this first search so that the rename entry activity can key off of it and we are using the entry id because the folder name will be changing as the count changes.
In the second Search Repository enter the search query:
{LF:Name="*", Type="DF"} & {LF:LOOKIN="%(SearchRepository_FirstResult_FullPath)", SUBFOLDERS=1}
This will give us a token with the count of folders and documents of under our root directory.
In the Rename Entry activity:
Entry to Rename = Other Entry -> Search Repository-First Result
(Be sure to use the output of the First Search, not the second! )
New Entry Name = <Folder Name> (%(SearchRepository2_Result Count))
Where the <Folder Name> is the actual text name of your folder, if you were using "Finance":
Finance (%(SearchRepository2_Result Count))
Publish and run, your directory name should update with the count.
Add a document or folder and rerun, viola.
You could now add conditional rules to look for additions or deletions under the root folder that would run this workflow automatically. Much like watching an __incoming directory for new files to process.
This would only work when items are added or deleted from the Finance folder itself, not the subfolders.
Optionally you could set this workflow up as a BP that could be ran when an updated count wanted to be seen.
( sorry I don’t have the graphics in my post, this is my first answers post, hope it made sense! )