def possibilities_count(sum_, dice_amount) -> int:
    """
    Returns the total count of possibilities for a given sum and
    number of dice using lru_cache.

    Better than storing all the possible combinations in a list.
    It can even be used for more number of dices.
    """
    poss_count = 0
    if dice_amount == 2:
        for d1 in range(1, 7):
            for d2 in range(1, 7):
                if d1 + d2 == sum_:
                    poss_count += 1
    else:
        for dn in range(1, 7):
            if sum_ - dn < 2:
                continue
            poss_count += possibilities_count(sum_ - dn, dice_amount - 1)
    return poss_count