Price Set fields with Quantity per Option
This can be done if you set the Input field type to Text/Numeric Quantity when you create a price field.

You will need to create one price field per option.  There are two slight variations for this field type. Based on your question I think the following will work for you: 


If A costs $5, set the "Price" field to 5.00 and make the field's label something like "Number of $5 Widgets"


and so on for B, C and D.

The other option, mostly used for donations, can be found in our book in the section on  membership pricesets. You will need to scroll down to the section on Non-membership price fields.