Added a tests counter.
Fixed a bug with an empty loop object in a data.

Added an appropriate autotest.
Added autotests for TMPL_VAR/TMPL_IF/TMPL_UNLESS with no data.