Thanks for your information, I have just tried it. Seem like that's the official way to get facet count, but I don't like they put facet field and facet count in one array, maybe my "Dumper +Regex" is safer.
my $facet_counts = $response->facet_counts;
my $autId = $facet_counts->{facet_fields}{author_id};
print Dumper(\$autId), "<br>";
for(my $i=0; $i < int(@{$autId}); $i++){
print @{$autId}[$i], ": ", @{$autId}[++$i], "<br>\n";
};
Output:
$VAR1 = \[ '9291', 131, '3389', 88, '622', 85, '123715', 81, '5091', 6
+3 ];
9291: 131
3389: 88
622: 85
123715: 81
5091: 63