in reply to Problems using File::Find

Sounds like a job for ... File::Find::Rule!
use File::Find::Rule; my $cnt = scalar find( directory => name => 'class', in => @good_dirs, );
That should roughly do what you want, but if not, tweak as you see fit. See. the File::Find::Rule docs for more info on this most marvellous of modules.
HTH

_________
broquaint