It is the typical indicator to measure the quality of software products. Normally project activities have their own constraints from resource and cost perspectives, therefore either "too less" or "too much" testing activities should not be performed to find that the product is "Good". Contrary to "Test Density" which is measured when planning test, "Bug Density" is measured when executing test.
Bug density is expressed as
Number of bugs found in test / Size of software
Size of software have traditinally been expressed as the total steps of source codes(ex,KSTEP), total number of elements in XMLs extracted from ETL tools is useful alternatives in todays development environment.