This could be optimized as the totalCount will be generated by the slice as well, so if we want this to only generate one query this could have reused existing result if there already was one. However if PagerFanta calls this function before getSlice then it would have been needed to be done differently.