Mapper Variable
Mapper variable can be set/ referred to in a mapper only. Ususally, when there are multiple lines of the input records, the mapping to a variable set will be done only once in a mapper (only the content of the first line will be mapped), but the mapper variable will be mapped, and the mapping times is as same as the number of the input records. Nmely, the counting process such as "var = var + 1" can be done in a mapper.
To add it as stream variable to output stream in a mapper, you should select "Yes" for the stream variable.
Memo
Having selected a mapper, you will see an inspector. Then you can define variable name, data type and initial value under the "mapper variable" tab in it.
About defined content, please refer to a mapper's "help" document.