The set of strings is isomorphic to a Cartesian Product of sets of the same cardinalities as the set of options (for example, if the template was "{I,We} like {HTML, CSS, Javascript}", you can make a set {0,1}x{0,1,2}, where each element in the product set maps to one string and vice versa. For example (0,0) might represent I like HTML, and (1,2) might represent We like Javascript).
Because there is a one to one map (bijection) between the Cartesian Product set and the set of strings, the size of the product set is the same as the size of the set of strings.
The cardinality of a cartesian product AxB, where A and B are sets, is |AxB|=|A|x|B|, so to find the size of the set of strings, you just need to multiply together the number of options at each point in the template where you have a choice.
Multiply the count in each set, gotcha. But did he just count it for each set? It seems like that would be time consuming. Is there some shortcut? or did he just write a quick program to do it?