Cyrrllic Plural helper

Hi! I would like to know how to add a custom helper to a theme. Because I can’t use the built-in “plural” helper because it doesn’t support Russian cases.