Ini memang terasa agak canggung, tapi saya tidak bisa memikirkan solusi yang lebih sederhana sekarang:
with val (col) as (
values (ARRAY['CAT','CAT DOG CAT','DOG Cat'])
), word_list as (
select unnest(col) as pc
from val
), wc as (
select array_length(string_to_array(pc, ' '),1) as word_count, pc
from word_list
)
select array_agg(pc order by word_count desc)
from wc;