Thank you both! I got it working exactly as I wanted.
The documentation is a bit lacking in information about how to use general program mode with custom columns, so I wanted to note—for the benefit of future information seekers—that even though it doesn't look like the program is properly formatted when you paste it from a text editor into the template field when creating a custom column, if it saves properly it should work...assuming the program syntax is correct, of course!
My final template:
Code:
program:
words=raw_field('#words');
length=first_matching_cmp(words,
1,'UNCOUNTED',
1001,'Flashfic',
7500,'Short Story',
17500,'Novelette',
40000,'Novella',
70000,'Short Novel',
180000,'Novel',
'Novel Plus')
This flags entries with empty word-count fields as UNCOUNTED, so I know I need to run the Count Pages plugin on them (rather than assigning the label Flashfic to them, which would be incorrect).