if ($count{$batch_dates}) { $count{$batch_dates}++; } else { $count{$batch_dates} = 1; } # end if #### $count{$batch_dates}++;