there are multiple ways to do it.
It depends how you want to do it.
- you can create a workflow to to increment the counter, every time a product is added to the quote.
- you create a plugin to do the same thing.
- you can create a javascript on form load and use count function of fetch xml like
<fetch aggregate='true'>
<entity name='account'>
<attribute name='address1_stateorprovince' aggregate='countcolumn' alias='countStates' distinct='true' />
</entity>
</fetch>
you don't have to use distinc if you don't want to.
I hope it helps.
Amreek singh Senior CRM Consultant CDC Praxa Sydney, Australia http://mscrmshop.blogspot.com