Fixes the calculation of the video count when lastN is enabled.