The fragment you quoted consists of two separate parts:
"Between them" in this case refers to a summarized count of something within a group of people.
Tom brought two cakes, and Luci brought three. They had five cakes between them.
Last Friday, our bowling club went to a restaurant, and their card reader was broken. The bill was 50$, but we only brought 45$ between us in cash. I had to run over to the next ATM.
The other part is "down to a few heads". This basically means that the count or the amount of something was reduced to the new number given.
On the weekend, we bought a big box of cookies. But since, the children ate the cookies down to a few crumbs.
In your example sentence, the group ate cabbage. They between them ate most of the cabbage available, so only a few heads of cabbage remain. They between them ate the cabbage down to a few heads.