fixes failing test and adds a new test for count