We can get the number of values via the ordinals of BytesValues:
```java
Ordinals.Docs ordinals = values.ordinals();
int numValues = ordinals.getNumOrds()
```

This should work for string based fields that support ordinals (I think string fields always support this). For number based fields this trickier, because usually a single number is encoded into several terms (depends on `increment_step` option in the mapping). 

I think this can be a nice optimisation for string based fields, but we can explore this later on.