What do you mean hourwise and circlewise? split by hour, and the hour sub-divided by circle, or two counts, one by hour (for any cycle), and one by cycle (for any hour)?
Here's one interpretation of your request, expressed as a small Perl program:
Code:
#!/usr/bin/perl -w
use strict;
my %hr;
my %ci;
while(<>){
chomp;
my @a=split(/\|/);
if ( defined($hr{$a[3]}) ) { $hr{$a[3]}++ } else { $hr{$a[3]} = 1; }
if ( defined($ci{$a[4]}) ) { $ci{$a[4]}++ } else { $ci{$a[4]} = 1; }
}
foreach my $k (keys %hr) {
printf("hour %-3s has a count of: %d\n", $k, $hr{$k});
}
foreach my $k (keys %ci) {
printf("circle %-10s has a count of: %d\n", $k, $ci{$k});
}