umbraco/Umbraco-CMS — pull request #439 by AndyButland (2014-08-03 21:15:16+00:00)
Title: U4-5290 - allow for retrieval of a tag's count as well as it's text

This is available from the obsoleted Tags API (umbraco.cms.businesslogic.Tags.Tag.GetTags), but currently isn't in the newer TagsService.

To implement this I've added a new property called NodeCount on ITag/Tag, and an optional flag called "withCount" to tag retrieval methods on TagService. If passed, the SQL is modified to do a GROUP BY/COUNT rather than a DISTINCT. Actually all the tables necessary were already joined, so I wouldn't expect much of a performance issue from retrieving the count.