A Dixmier Trace Formula for the Density of States