Calculate trace number from shape and index of all indirect dimensions assuming the same phase and time ordering.