Implemented beam count logic on `GeneralizedBeam`.

`GeneralizedBeam.durations` is now active as well.