Macdoesit Sub Count

Macdoesit Sub Count - In the above mentioned output, i need the distinct sub count based on column logcat and for example, in the give total distinct count for particular type i need to get the number how many.