This is way too overcomplicated.
Consider a dict where the key is the unique flavor name and the value is its vote count.
Such a dict can be converted to a 2 column table (list of lists) using one of the dict blocks.

There are lots of table sorting techniques in