Length functions, multiplicities and algebraic entropy