If you're looking to pull out the number of dates falling on a particular day of the month, you just need to pull this value out of the date.
There are various way to do this.
Below uses extract( day from ...):
with dates as (
select date'2017-12-31' + level dt
from dual
connect by level <= 365
)
select count(*) from dates
where extract ( day from dt ) = 15;
COUNT(*)
12
with dates as (
select date'2017-12-31' + level dt
from dual
connect by level <= 365
)
select count(*) from dates
where extract ( day from dt ) = 15
and dt between date'2018-03-11' and date'2018-04-19';
COUNT(*)
2
with dates as (
select date'2017-12-31' + level dt
from dual
connect by level <= 365
)
select count(*) from dates
where extract ( day from dt ) = 9
and dt between date'2018-03-11' and date'2018-04-19';
COUNT(*)
1