Fixcount

Added new tests to test for bug when counting in parallel

Fixed counting in parallel
I have created that pull request.