Clkrate is no longer used.
Handle error counts and draw boxes for them too.

Actually count the pulses too using bincount