You can record the input easily, using an FSM that simply listens for buttons in sequence. For example state 1: listen to A button, go to state 2: listen to A button, etc. And a Wait action in every such state with short duration that ends the combo when no button was pressed. How you record the input is up to design. You could count an int variable for example. You could set bool variables at key states. You can send events at certain states etcetera.
Once you track the series of inputs plus the timing (how fast etc), you’ll need to figure out how to use that information. Another (or multiple) FSMs is either reading from the input FSM, e.g. combo length, and triggers the attack, or they are triggered or set from the input FSM.