So if you have ROKData objects with Closed_Date 20240430, 20240428, 20240501, 20240502,20240502, you want
YearComplete, MonthComplete count
2024 03 0
2024 04 2
2024 05 3
2024 06 0
If so, yes you can do this using OQL. Even more so: it is advisable, since that will separate your data-gathering (now done with OQL) from your graph-formatting.
See https://service.mendixcloud.com/p/OQL for an OQL-playground and especially example "COUNT, SUM and GROUP By Enumeration".
In your OQL add a line between line 3 and 4:
, COUNT(*) as ClosedThisMonth