Your data is not consistent: when you have two rules, there is only one dot, and when you have one rule there is also one dot.

If the rules would be 4 characters each plus the dot, then you could use the following SQL:
Code:
select to_char(DATE,'Mon YYYY'), count(RULES)
      , SUM(LENGTH(RULES)/5) 
from DETAIL
where RULES IS NOT NULL
group by rollup(to_char(DATE,'Mon YYYY'))
order by to_date(to_char(DATE,'Mon YYYY'),'Mon YYYY')