Please solve the programming task below using a self-contained code snippet in a markdown code block.

You are given an array of strings words and a string chars.
A string is good if it can be formed by characters from chars (each character can only be used once).
Return the sum of lengths of all good strings in words.
 
Please complete the following python code precisely:
```python
class Solution:
    def countCharacters(self, words: List[str], chars: str) -> int:
```