Does this work? Your indicator should just count the number of objects where today's date is on or after the date closed and where today's date is on or before the opening date.
If today was 1/8/24 and it closed on 1/1/24 with an open date of 1/10/24 -- "Today" is after the close date of 1/1 and also before the open date of 1/10.
Indicator -> Data -> Settings -> Filter