Fix recalculation of per-device backup counts.

fixes #4
Regression tests for text report output
Regression tests for HTML report output