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

You are given a string s consisting only of characters 'a' and 'b'​​​​.
You can delete any number of characters in s to make s balanced. s is balanced if there is no pair of indices (i,j) such that i < j and s[i] = 'b' and s[j]= 'a'.
Return the minimum number of deletions needed to make s balanced.
 
Please complete the following python code precisely:
```python
class Solution:
    def minimumDeletions(self, s: str) -> int:
```