// For the first vector of the inner product, we're using just the temp vector. For the second vector, we're using the temp vector shifted by one element to the right.
// The result of the inner product is a vector of 1s and 0s, where 1 means that the two elements are different and 0 means that they are the same.
// The sum of this vector is the number of unique elements (minus 1, which is why we need to add 1 at the end).
// Note: the keys are sorted, which is why we can use the shifted vector.