counts working in array of hashes