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

Write a program to count the number of days between two dates.
The two dates are given as strings, their format is YYYY-MM-DD as shown in the examples.
 
Please complete the following python code precisely:
```python
class Solution:
    def daysBetweenDates(self, date1: str, date2: str) -> int:
```