def _get_total(rows, has_steps=False):
    """Returns total rows and steps if applicable."""
    total = len(rows)
    if has_steps:
        total += sum([len(row.statements) for row in rows])
    return total