I don't know if it matters, but I usually extract all of the args in main and pass just the necessary parameters to functions like search_resources.  In this case it would be

def search_resources(qc, rtype, name, count)