This appears to double count things. In fact, count should not even appear as a parameter.