Count how many slices lay in multiple intervals over a spread

i am thinking about a module and wanted to check if it allready exists before working on it.

it should take a input spread and a interval value spread
and give out a spread with the slice count of the values from the input spread laying within the given intervall (so output spread has same spread count as interval value spread).


guess that would be Interval (Spreads) together with CountIndices (Spreads)/Occurrence (Value), if i get what you want to achieve