fixed a bug where adminstration of collcount was seriously wrong, also made a unittest pass