Ok. Got the code sorted. This was written and tested (again) on OS X 10.11.3 (El Capitan). It is working now. Second paragraph in my previous post — yes, copy/paste the following AppleScript code into your Script Editor, and continue to follow directions from that earlier post.
-- Select one or more folders in the Finder, and then run this script. It will cycle
-- through each selected folder, add the file count of the entire folder hierarchy,
-- and display the total file count for the folder selection.
-- VikingOSX, Feb. 17 2016, Apple Support Communities
set folder_list to {}
set file_cnt to 0
tell application "Finder"
if (number of items in my selection) = 0 then
display alert "You must select at least one directory ... " & return & "Quitting." as critical giving up after 10
error number -128
return
end if
set folder_list to selection
repeat with afolder from 1 to the number of items in folder_list
set file_cnt to file_cnt + (count of (every document file of entire contents of folder (item afolder of folder_list as text)))
end repeat
end tell
display dialog "Count of all files in all selected folders: " & file_cnt as text
return