decided to inject the total number of records instead of injecting the paginator