It's not super clear from the Search documentation that numberMatched and numberReturned are actually in the specification and can be used. It's defined in ItemCollection, but it only appears directly in the spec in the OpenAPI document or if you specifically read the ItemCollection spec (which is referred to from the Search spec, but not linked to). You can't find it in the README of the Search spec.