Remove unused variable
Add new pkg_object_count public function
Use pkg_object_count instead of pkg_list_count