[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.
Yes, I did. The common thing about that exception and the exception's description is that there is something *technically* wrong about the method call.

Here, however, the method call is technically correct, but the underlying object is in a state when that method may not be called. I think that's a difference.