You can look at it and see that it uses an xsl:key to compute the current number of the figure. So you will probably need a separate xsl:key for counting the equation-figures.The main problem is that equation-figure extends figure so you need to differentiate between these cases when computing the static text which appears before the title.