Fix counts tests
Docs and cleanup