How to count duplicate strings in an array

@william.coulson
ensure following:

handling empty result (e.g. no duplicates are available and nothing is to add to the statistic datatable) can be done with applying following pattern:

2 Likes