Spectral flow and Dixmier traces