How I can count values and obtain another array structure

visit shbcf.ru