The quantity of Steel is usually derived from the drawings using Bar Bending Schedule. The quantity of Steel arrived used bar bending schedule is usually in length of each dia of bar required.  (Sample Bar Bending Chart shown below)
How To Derive The Formula For Weight Of Steel Bar?
Here I am willing to explain how it has been arrived D2/162 (Note: D unit is in MM)
Density of Steel (in Kgs/Cu.m) = Weight of Steel (in Kgs)/Volume of Steel (in Cu.m)
So
Weight of Bar (in Kgs) = Volume of Steel Bar (in Cu.m) X Density of Steel Bar (in Kgs/Cu.m)
Data:
Volume of Steel Bar (Cu.m) = Area of Steel Bar (sq.mtr) X Length of Steel Bar (mtr)
Since We are trying to calculate the unit weight of Steel Bar, the length of Steel Bar in the calculation would be 1 mtr or 1000 mm.

Area of Steel Bar = (3.14 X D^2)/4
Density of Steel Bar = 7850 Kgs/Cu.m = 7850/(1000X1000X1000) Cubic mm
So considering these data in the Weight formula we get
Unit Weight of Steel Bar (in Kgs) = (3.14 X D^2)/4 X 1000 X 7850 / (1000 X 1000 X 1000)

= D^2 X (0.006162)
To simplify, we can reciprocate the decimal figure here i.e., (1/0.006162) and get a figure of 162.28
Unit weight of Steel Bar (in Kgs) = (D^2)/162.28 ~ (D^2)/162
Where D is the Diameter of the Steel Bar in mm.

How To Measure The Weight Of Steel Received At Site?
Since it is hard to weight the bars at site, Trucks carrying steel (Gross weight) and empty truck (Tare weight). Steel Weight can be calculated by the following forumla

Reinforcement Steel received at Site (in Kgs) = Gross Weight – Tare Weight
Diesel allowance (30-40 Kgs) is diesel consumed between obtaining the two weights This Diesel allownce needs to be deducted incase the weigh bridge is far away from the Site.