def METHOD_NAME(slug, query, count_query):
    total_rows_updated = 0
    iterations = 0
    total_rows = _get_count(count_query)
    if total_rows == 0:
        print(f"Skipping backfill for '{slug}', no rows to update.")
        return
    print(f"Running backfill for '{slug}' query. {total_rows} rows to update")
    while True:
        with transaction.atomic(using='default'), connections["default"].cursor() as cursor:
            cursor.execute(query)
            rowcount = cursor.rowcount
        total_rows_updated += rowcount
        iterations += 1
        if rowcount != 0 or total_rows_updated == 0:
            print(f"  [{slug}] Updated {total_rows_updated} of {total_rows} rows")
        if rowcount == 0:
            break
    return total_rows_updated, iterations