Updating the counting method and tests for it.