Counting the number of files with in a diectory with a pattern but pattern dosen't know

view full story

http://unix.stackexchange.com – to count the files in a directory.. having some pattern for some files.. but we dont know the pattern .. how to count than particular pattern files ... example if a directory ha xx_1.txt xx_2.txt and yy_1.txt yy_2.txt the xx file should be count and yy files should be count.. but we dont know what is xx and yy (HowTos)