I wrote a template for that a while ago in a discussion on the Kobo forum. See
this post. I don't actually use it as a column, but use a slightly modified version to set colours based on the type.
And looking at it now, using first_matching_cmp, would be better:
Code:
program:
words=raw_field('#words');
shelf_name=first_matching_cmp(words, 7500, 'Short Story', 17500, 'Novelette', 40000, 'Novella', 'Novel');
I haven't tested it, but it should be right.