def count_samples(input_data):
    """
    Count number of samples in the input data

    Parameters
    ----------
    input_data : array-like or list/tuple of array-like objects
        Input data to the network

    Returns
    -------
    int
        Number of samples in the input data.
    """
    if isinstance(input_data, (list, tuple)):
        return len(input_data[0])
    return len(input_data)