Count is usually thought of as an integer representing a number of bars, but can actually be any decimal value. An EMA is constructed by multiplying each difference between the result so far and the next value by a factor equal to 2 / (count + 1).
Triple EMA is calculated as 3 * EMA(expr, count) - 3 * EMA(EMA(expr, count)) + EMA(EMA(EMA(expr, count)))
Unlike the EMA function, TEMA applies the exponential weight factor from the start of available data rather than beginning with MA(expr, count). This is consistent with how other backtesting software calculates this indicator.