Added a total property to the getMany function