Basic Examples 
(4)
 

Because neither a "b" nor "e" is present in the first argument, the output
Association
has values of 0 for those keys; otherwise, the values are just as they would be with
Counts
:
In[1]:=
[◼]
ItemCounts
[{"d","d","c","d","d","a","c","c","d"},CharacterRange["a","e"]]
Out[1]=
a1,b0,c3,d5,e0
———
Keys not found are assumed to take on the default value of 42:
In[2]:=
[◼]
ItemCounts
[{"d","d","c","d","d","a","c","c","d"},CharacterRange["a","e"],42]
Out[2]=
a1,b42,c3,d5,e42
———
The association in the second argument results in missing keys being set to 0, except for key "b", which is set to 42:
In[3]:=
[◼]
ItemCounts
[{"d","d","c","d","d","a","c","c","d"},"a"0,"b"42,"c"0,"d"0,"e"0]
Out[3]=
a1,b42,c3,d5,e0
———
An operator form of
ItemCounts
:
In[4]:=
[◼]
ItemCounts
[CharacterRange["a","g"]][{"d","d","c","d","d","a","c","c","d"}]
Out[4]=
a1,b0,c3,d5,e0,f0,g0

Scope 
(2)
 


Applications 
(1)
 


Properties and Relations 
(2)
 


Possible Issues 
(3)
 


Neat Examples 
(2)
 
