I'd guess exactly the same way
sub {
my $total = $DB->table('Links')->count ( { Colour => 'BLUE', Size => 'medium' } );
return $total;
}
sub {
my $total = $DB->table('Links')->count ( { Colour => 'BLUE', Size => 'medium' } );
return $total;
}