altered package_search to return hit count