Take a look at the file management category, specifically
cfdirectory. You can use its "filter" attribute to search for text
files only. Then use the result set "recordCount" to obtain the
total number of files found.
http://livedocs.adobe.com/coldfusion/8/htmldocs/Tags-pt0_11.html#2459859