Formula to calculate duplicates in a cell

Is your software capable of counting occurrences of duplicates in a cell? I perform a lookup of a row and want to know the occurrences of elements like this:

Paul, Paul, John, Pete, John, Paul → 3x Paul, 2x John, 1x John

The names are not predefined and can be in a vast number. So handcoding every name in a CountIF is not valuable.