How can I count the days of each week for a specific month that the user will give to my SQL query? For example, if the user gives April 2021, the result will be:

[![enter image description here](https://i.stack.imgur.com/1eZFf.png)](https://i.stack.imgur.com/1eZFf.png)

If the user gives May 2021 the result will be:

[![enter image description here](https://i.stack.imgur.com/KFjPK.png)](https://i.stack.imgur.com/KFjPK.png)