One additional idea might be for those books with no word count
Code:
program:
words=raw_field('#words');
shelf_name=cmp(words, 0, 'No Word Count', 'No Word Count', 'Short Story');
shelf_name=cmp(words, 1000, shelf_name, 'Novel', 'Novel');
shelf_name=cmp(words, 5000, shelf_name, 'Medium', 'Medium');
shelf_name=cmp(words, 20000, shelf_name, 'Long', 'Long');
shelf_name=cmp(words, 50000, shelf_name, 'Epic', 'Epic');