I know that every permutation of a finite set can be decomposed into product of disjoint cycles and every cycle can be decomposed into product of transpositions (cycles of length 2). However the decomposition into transpositions is not unique. I'm aware of at least two "algorithms" for decomposing a cycle into a product of transpositions:
$$(a_1, a_2, \ldots, a_n) = (a_1, a_n)(a_1, a_{n - 1}) \cdots (a_1, a_2)$$
$$(a_1, a_2, \ldots, a_n) = (a_1, a_2)(a_2, a_3) \cdots(a_{n - 1}, a_n)$$
Is there a theorem for counting all possible ways of decomposing a cycle into a product of transpositions (given that I only care about decomposition into $n-1$ transpositions)?