This is about how many forms of a phrase are needed to cover all cases. You have a list of phrase templates for each phrase where the number gets substituted in and the number of templates for each phrase depends on the language rule. So for Russian you have 3 templates and if the number is 31, you use template 1, but if it's 0, you use template 3. The relevant word is already declined in the proper case. This isn't about programmaticaly pluralising a single word, it's just so you can select a phrase template.
Also, it’s a bit naïve to say that a declined language only has 1-2 forms without taking into account oblique cases, but that’s a hard thing to deal with programmatically.