# This file was auto generated by Styx.
# Do not edit this file directly.

import typing
import pathlib
from styxdefs import *
import dataclasses

COUNT_METADATA = Metadata(
    id="3836250f08dfeed6fcad0e888310644533ee13db.boutiques",
    name="count",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class CountOutputs(typing.NamedTuple):
    """
    Output object returned when calling `count(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""


def count(
    bot: str,
    top: str,
    step: str | None = None,
    runner: Runner | None = None,
) -> CountOutputs:
    """
    Numbered copies generator with custom format support and random sequence
    options.
    
    Author: AFNI Team
    
    URL: https://afni.nimh.nih.gov/pub/dist/doc/program_help/count.html
    
    Args:
        bot: Starting number or character.
        top: Ending number or character.
        step: Stride step or mode (integer step size, R#, S# or S).
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `CountOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(COUNT_METADATA)
    cargs = []
    cargs.append("count")
    cargs.append("[OPTIONS]")
    cargs.append(bot)
    cargs.append(top)
    if step is not None:
        cargs.append(step)
    ret = CountOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "COUNT_METADATA",
    "CountOutputs",
    "count",
]
