How i get the value and count of prefix from string

Hi All,

Suppose I have 5 documents like:

{
"message": "ab;cd;ef;",
"message": "ab;gh;jk",
"message": "sumit;sachin;test",
"message": "sumit;amit,anuj",
"message": "sam;brain;new"
}

Can any buddy suggest me how i can get the value and value for first prefix in string like:

ab: 2
sumit: 2
sam: 1

Thanks & Regards,
Sumit Gupta

Solve it using Analyzer.Thanks.