private function getNumberOfParts($key, $value)
    {
        $parts = substr($value, strlen(self::VALUE_SPLIT));

        if (!ctype_digit($parts) || $parts > PHP_INT_MAX) {
            throw new \RuntimeException(
                'Number of parts in split value for key "'.$key.'" is invalid.'
            );
        }

        // We know it's an integer. Now also force
        // its data type to be an integer.
        return (int) $parts;
    }