CountsBy
CountsBy[{e1,e2,…},f]
gives an association whose keys are the distinct values of the f[ei], and whose values give the number of times these f[ei] values appear.
Examples
open allclose all
Wolfram Research (2014), CountsBy, Wolfram Language function, https://reference.wolfram.com/language/ref/CountsBy.html.
Text
Wolfram Research (2014), CountsBy, Wolfram Language function, https://reference.wolfram.com/language/ref/CountsBy.html.
CMS
Wolfram Language. 2014. "CountsBy." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CountsBy.html.
APA
Wolfram Language. (2014). CountsBy. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CountsBy.html