Use cases:

  1. A custom node type with a field that is set to allow multiple values (say documents as attachments). When the node is displayed as a teaser, there is a need to show the count of how many attachments have been added (not the actual attachments). How can one achieve this with the current core functionality?

  2. A views listing of nodes of the type from the use case 1 above. Same deal, the count of the attached files needs to be displayed in a column. The only way I can think of in order to achieve this currently is to rewrite the output of the field using php (I think that this would require https://www.drupal.org/project/views_php which has not been ported yet) and mess with deltas (which novice users might not understand).

There's a module in d.org contrib that does that: https://www.drupal.org/project/field_count_formatter

Display formatter: image

Views formatter: image

I think that this would be a very nice addition to core views and field display formatters that would simplify a not so uncommon task.

GitHub Issue #: 
2634