[OptionsResolver] fix count() and exceptions

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Please see commits.
The output of `resolve()` is already covered in different test cases, which is why I did not add an assertion here.

I think that `assertNotEmpty()` is confusing. Either we add a specific assertion (`assertEquals()`), or we leave it away IMO.