I have a question how can I count the number of punctuation symbols in a string.

**Here is my code snippet**

```
fun punctuationCount(stringValue: Editable): Int {
        val trimmedStr = stringValue.trim()
        return if (trimmedStr.isEmpty()) {
            0
        } else {
           return trimmedStr.split("[a-zA-Z&&[ \t]]".toRegex()).size
        }
    }

```