
You can get “folder count in folder“!
VBA Code
As an example, get folder count in “test” folder.


Option Explicit
Sub sample()
Dim targetFolder As String
Dim fso As Object
Dim folderCount As Long
targetFolder = "C:\Users\user\Desktop\test"
Set fso = CreateObject("Scripting.FileSystemObject")
'Get folder count in folder
folderCount = fso.GetFolder(targetFolder).SubFolders.Count
MsgBox ("folder count : " & folderCount)
Set fso = Nothing
End Sub
Result
You can get “folder count in folder“!

FYI No.1
Also, you can get “file count in folder“!
For more information, see the following article:
FYI No.2
For more information about following, see the following official online manual:
●“GetFolder method” of “FileSystemObject”
●“SubFolders property” of “Folder Object”
●Folders collection
●“Count property” of “collection”