We give a method for enumerating sequences over a finite alphabet with respect to certain maximal configurations. The required generating functions are obtained as solutions of systems of linear equations. The method utilizes a combinatorial decomposition of sequences into maximal sub-configurations.