bugfix: get page and resource count correctly if resource returns a list/tuple/generator