def ngettext(msg, msgp, count):
    """
    Like @see: gettext, but consider plural forms. If a translation is found, apply the plural formula to n, and return
    the resulting message (some languages have more than two plural forms). If no translation is found, return singular
    if n is 1; return plural otherwise. The Plural formula is taken from the catalog header. It is a C or Python
    expression that has a free variable n; the expression evaluates to the index of the plural in the catalog.
    See the GNU gettext documentation for the precise syntax to be used in .po files and the formulas for a variety of
    languages.
    
    @param msg: string
        The key message.
    @param msgp: string
        The plural key message.
    @return: string
        The translated message.
    """
    assert isinstance(msg, str), 'Invalid key message %s' % msg
    assert isinstance(msgp, str), 'Invalid plural key message %s' % msg
    if count == 1:
        return msg
    return msgp
