Rational transductions and complexity of counting problems