How do I count and sort simple multidimensional array like this?

Printable View