ok, so what you want to do is loop over all the files that you get from a cfdirectory call. You may want to build in some logic to check for particular filetypes only (or this can be covered by the filter attribute in cfdirectory).
And as you're counting occurences of a list of possible strings, we need to have multiple counters for each. There's various ways you could store that information in variables, I'm going to suggest a struct. So if you're looking for the count of the strings "foo" and "bar", i'm suggesting you will end up with a structure which looks like:
{
'foo' = 100,
'bar' = 77
}
And here's how I'd do it. I populate the structure with zeroes for each string you're searching for first, then increment it while looping over the files. I'm assuming your code that counts the number of instances of the search terms is good, I haven't looked at it too closely.
<cfset charList = "foo,bar">
<cfset filetypes = arrayNew(1)>
<cfset arrayAppend(filetypes, "js")>
<cfset arrayAppend(filetypes, "cfm")>
<cfset stringCounts = structNew()>
<cfloop list="#charList#" index="x">
<cfset stringCounts[x] = 0>
</cfloop>
<cfloop index="i" from="1" to="#arrayLen(filetypes)#">
<cfdirectory
action="list"
directory="your directory"
name="Files"
recurse = "yes"
filter="*.#filetypes[i]#" />
<cfloop query="Files">
<cffile action="read"
file="#Files.directory#\#Files.name#"
variable="filecontent">
<cfloop list="#charList#" index="x">
<cfset stringCounts[x] = stringCounts[x] + val(len(filecontent) - len(replace(filecontent,x,"","all")))/Len(x)>
<cfoutput>#Files.directory#\#Files.name# : count of '#htmlEditFormat(x)#' = #stringCounts[x]#<br></cfoutput>
</cfloop>
</cfloop>
</cfloop>
<cfloop collection="#stringCounts#" item="x">
<cfoutput>Count of '#htmlEditFormat(x)#' = #stringCounts[x]#<br></cfoutput>
</cfloop>