def count_ads()

in python/fb_ads_library_api_operators.py [0:0]


def count_ads(generator_ad_archives, args, is_verbose=False):
    """
    Count how many ad_archives match your query
    """
    count = 0
    for ad_archives in generator_ad_archives:
        count += len(ad_archives)
        if is_verbose:
            print("counting %d" % count)
    print("Total number of ads match the query: {}".format(count))