Inverse counting statistics based on generalized factorial cumulants