I have an sorted array like this:
['FATAL <error title="Request timed out.">',
'FATAL <error title="Request timed out.">',
'FATAL <error title="There is insufficient system memory to run this query.">']
I would like to get something like this (does not have to be a hash):
[{:error => 'FATAL <error title="Request timed out.">', :count => 2}
{:error => 'FATAL <error title="There is insufficient system memory to run this query.">', :count => 1}]