Using
Time::Piece and
Time::Seconds, (in the core since perl version 5.9.5), you can get the count of files created yesterday with the code below.
#!/usr/bin/perl
use strict;
use warnings;
use Time::Piece;
use Time::Seconds;
my $t = localtime() - ONE_DAY; # yesterday
my $count = grep {$t->ymd eq localtime( (stat)[9] )->ymd} glob "*.*";
(I was not able to use the code below, even though the documentation for Time::Piece says '==' is possible.)
my $count = grep {$t == localtime( (stat)[9] )} glob "*.*";
Update: Of course it wouldn't work as it's comparing 'ymdhms' rather than 'ymd'.