# Spec Counter
Extends the input stream by a second field which enumerates the elements.

Extends | Pipe
All Extended | Pipe
Defined in | <seqan/pipe.h>
Signature | `template <typename TInput> class Pipe<TInput, Counter>;`

## Template Parameters

`TInput` | The type of the pipeline module this module reads from.

## Member Function Overview

### Member Functions Inherited From Pipe

- `Pipe`

## Interface Function Overview

### Interface Functions Inherited From Pipe

- `assign`
- `atEnd`
- `beginRead`
- `endRead`
- `front`
- `length`
- `pop`

## Interface Metafunction Overview

### Interface Metafunctions Inherited From Pipe

- `Size`
- `Value`

## Detailed Description

The output type is a Pair of input type and size type (i.e. `Pair<Value<TInput>::Type, Size<TInput>::Type`).

The first output field is the original input stream.

The second output field begins with 0 and increases by 1 per element.

#### Dox Sources

    /*!
     * @class Counter
     *
     * @extends Pipe
     *
     * @headerfile <seqan/pipe.h>
     *
     * @brief Extends the input stream by a second field which enumerates the
     *        elements.
     *
     * @signature template <typename TInput> class Pipe<TInput, Counter>;
     *
     * @tparam TInput The type of the pipeline module this module reads from.
     *
     * The output type is a Pair of input type and size type (i.e.
     * <tt>Pair&lt;Value&lt;TInput&gt;::Type, Size&lt;TInput&gt;::Type</tt>).
     *
     * The first output field is the original input stream.
     *
     * The second output field begins with 0 and increases by 1 per element.
     */