@Override
    public long getNumberOfValues(Object key) {
      if (getRegion().containsValueForKey(key)) {
        return 1;
      }
      return 0;
    }
Return the number of values for the specified key in this index.
geode-core/src/main/java/org/apache/geode/cache/query/internal/index/PrimaryKeyIndex.java