generators.tdTransducer("step counter"):
  (
    { fern:3, fern2:3, tip:0, col:1, col2:1, .:2, background:0,
      FERN1:0, FERN2:0, FERN3:0, FERN4:0, FERN5:0, FERN6:0, FERN7:0},
    { s:1, 0:0 },
    { q },
    {
      q[(x1 . x2)] -> q[x2],
      q[fern[x1,x2,x3]] -> s[q[x1]],
      q[col[x1]] -> q[x1],
      q[col2[x1]] -> q[x1],
      q[tip] -> 0,
      q[FERN1] -> 0,
      q[FERN2] -> 0,
      q[FERN3] -> 0,
      q[FERN4] -> 0,
      q[FERN5] -> 0,
      q[FERN6] -> 0,
      q[FERN7] -> 0,
      q[background] -> 0
    },
    q
  )
