Where D(E) comes from: counting states in k-space  (Datta Sec. 6.2–6.3)

In a box of size L the allowed wave vectors k form an evenly spaced grid (spacing 2π/L). The energy E = ℏ²k²/2m is not evenly spaced. Count the dots whose energy falls in a thin slice E to E + ΔE: that count divided by ΔE is the density of states.

Dimension:
States with energy below E: N(E)–
States in the orange slice ΔN–
Counted D(E) = ΔN/ΔE–
Theory–