Add support for total number of results returned

Also adds support for adding information to the response wrapper.