Rename folder (add to current folder name) count of contents

Hello guys

Im kinda new to this, bare with the simplicity of my request.

The idea is to drop a given folder on an ‘app’ that could count the number of files inside and add that to the folder name (ignoring folders or subfolders of files inside of subfolders),

ie.

Mother Folder 5

photo-a.jpeg
photo-b.jpeg
some random folder would be ignored, contents ignored too
photo-c.jpeg
photo-d.jpeg
photo-e.jpeg
some other random folder would be ignored, contents ignored too

The best would be to be able to toss, say 10 or whatever number of folders; on that app and it would do it for each individually

ie.

Some Folder 3

photo-a.jpeg
photo-b.jpeg
photo-c.jpeg

Some other Folder 2

photo-a.jpeg
photo-b.jpeg

Another random Folder 3

photo-a.jpeg
photo-b.jpeg
photo-c.jpeg

Other folder 2

photo-a.jpeg
photo-b.jpeg

Random folder 3

photo-a.jpeg
photo-b.jpeg
photo-c.jpeg

I hope this makes some sense, Ive found this little piece of code that has helped me but once I have to do lots it gets tiring to rename hundreds of folders manually…

set root_fol to (choose folder)

tell application "Finder"
	set files_ to count files of entire contents of root_fol
	set folders_ to count folders of entire contents of root_fol
end tell

display dialog ("Path: " & POSIX path of root_fol) & return & return & ¬
	"Files: " & files_ & return & "Sub-folders: " & folders_ & return & ¬
	"Total Item Count: " & (files_ + folders_) buttons ¬
	{"OK"} default button 1

Hi. Save this as an application, and it will create a droplet that meets the criteria in your question.

on open (dropped)
	tell application "Finder" to repeat with aFolder in dropped
		set folder aFolder's name to (aFolder's name) & space & (count aFolder's files)
	end repeat
end open