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

Given a string s consisting only of characters a, b and c.
Return the number of substrings containing at least one occurrence of all these characters a, b and c.
 
Please complete the following python code precisely:
```python
class Solution:
    def numberOfSubstrings(self, s: str) -> int:
```