Assuming that the numbers are a part of the text and can be styled as a paragraph you can set up a paragraph style that uses Rules as faux backgrounds.
Create a new paragraph style and set Character Color → [Paper].
Set a Rule Above with a weight as high as you want the background and a negative Offset so that it is vertically centered on your number. Make sure the Width is set to Column.
Set a Rule Below with the same weight and a positive Offset so that it is vertically centered on your number. Set the Width to Text. Set a negative Left Indent and Right Indent to create padding around the number.
The left indent will pull the rule outside of the text area so set a positive left indent under Indents & Spacing to push the rule back in to position.
A quick preview
The numbers have a paragraph style with only a rule above, rule below, character color and left indent set. The basic paragraph style has a left indent and spacing before/after set:
If your numbers are an automatically numbered list it may be possible with a combination of character styles on the numbers and paragraph styles but will be a lot more work. It will be easier to convert the numbers to text (Type → Bulleted & Numbered Lists → Convert Numbering to Text) and use paragraph styles as above.