Script /commands to get all the files count

Hello All,

I would need to write a shell script to find the files generation count for the given day and the folder.Presently I am using

(ls -ltr *filename* | grep "Feb  19" | wc -l )

from each folder and getting the counts.I would like to create a script which will get the counts under the directory from given folders.Please help me with this requirement.I know very basic about Shell scripting. Thank you

Hi,
Maybe so

grep -lr "Feb  19" --include="*filename*" ./ | xargs dirname | sort | uniq -c

--- Post updated at 12:41 ---

I advise you to use "grep" with options -Is additionally in the production
and xargs dirname 2>/dev/null

Please always post your OS, shell, and deployed tools' versions, so people know what limitations or extra features they suffer / offer. And, it helps to precisely define WHAT you're after. What does "from given folder" mean?

Did you consider the find command with the -mtime or -newer tests?

Thank you for your response. I would like to get the counts from each sub directory under ZUR (My directory path:Tableau/Tabsan/Ouputs/ZUR) ZUR has many sub directories in it. I would like to get the outputs generated under ZUR and send them in an email.