How to find the number of atomic microstates for a given electronic configuration? Given some electron configuration, I know the following formula can be used to determine the number of microstates:

$$\text{# mircostates} = \frac{(\text{# electron positions})!}{((\text{# electrons})!(\text{# positions} - \text{# electrons})!)}$$

So for 2 electrons in a $\mathrm{p}$ orbital it would be $6!/(2!4!) = 15$, or for two electrons in a $\mathrm{d}$ orbital it would be $10!/(2!8!) = 45$.  

I'm a little confused how to apply this for a situation where all the electrons are not in the same $l$ level.

For a configuration like one electron in $\mathrm{s}$ and one in $\mathrm{d}$ would the number of microstates be the product of the above formula for each $l$ level?

$$\frac{2!}{1!1!}\cdot \frac{10!}{1!9!} = 20$$

Or for one electron in $\mathrm{s}$ and one in $\mathrm{f}$:

$$\frac{2!}{1!1!}\cdot \frac{14!}{1!13!} = 28$$

I assumed it would work like this because the formula reminds me of multiplicity, so it would make sense for it to be a product. But it also occurred to me that the 2 $l$ levels could be combined for the formula, so for a $\mathrm{(s^1)(d^1)}$ electron configuration, the number of positions would be $$\frac{(10+2)!}{2!(10+2-2)!} = \frac{12!}{2!10!}= 66,$$ which is must bigger than what I had before.

Can anyone clear up how to apply this formula to a case like this?

For clarification, the exact specification in the problem was: 


  Imagine a $\mathrm{s^1\, f^1}$ electron system (that is, 1 s electron and 1 f electron; no p or d electrons).  How many total microstates exist for this system?


I think this means that the one $\mathrm{s}$ and one $\mathrm{f}$ electrons are each confined to their $l$ level, which is why I thought the multiplicity of microstates would be the product of the above formula for each, but I'm not sure.
You really have to calculate out things exactly, and particularly carefully if electrons are in the same orbital, e.g. $p^2$, when the Pauli principle has to be checked. Its a bit tedious but it can be very quick with a bit of practice especially if electrons are in different orbitals. 
You start by calculating the spin, orbital and total of all angular momentum. Each electron has spin quantum number s = 1/2 and magnetic quantum number $m_s$ = +-1/2. Orbitals have angular momentum of s=0, p=1, d=2, f=3 etc units.
The total spin angular momentum is the series of values $S=|s1+s2|...|s1-s2| $ where s1 and s2 =+1/2 are the quantum numbers of each electron. The total angular momentum is   $L=|l1+l2|...|l1-l2| $  and total angular momentum $J=|L+S|...|L-S| $ 
Each of these are called Clebsch-Gordon series. The way to calculate them is to calculate the maximum and minimum values and make intervening values separated by 1. Note that sometimes there is only one value and all values are positive. e.g. J=5/3, 3/2, 1/2 or J could be 0 or 3 etc.
The term symbol has the form $^{2S+1}L_J$.
The super-prefix is the spin multiplicity, for spin angular momentum $S$ this is  $2S+1$ or in general $2X+1$ for angular momentum X.
 In your question $s^1f^1$ the total spin using the series above is  S = 0 and 1. The spin multiplicity is thus 1 and 3, singlets and triplets terms only. The total orbital angular momentum L = 3 since the s orbital has zero angular momentum. Thus the terms so far are 
$^1F$ and $^3F$ The number of microstates (multiplicity) in each term is $(2S+1)(2L+1)$. This is 7 for the $^1F$ and 3.7=21 for the $^3F$ making 28 in total. These states are also degenerate in energy. You should calculate that $s^1d^1$ has 20 microstates.

The total angular momentum J series associated with S=1 is $J=|3+1|.... |3-1|$ or 4, 3 and 2 and with S=0 , J=3.  Thus only triplet states have J = 4 and 2 and both singlet and triplets J=3. The terms symbols for the levels are 
$^1F_3$, $^3F_4$, $^3F_3$,  $^3F_2$ 
 The total multiplicity from the J values is is 7+9+7+5 = 28 the same as from terms.

When the electrons are in the same orbital then the only secure way of calculating terms is to list all the individual quantum numbers in a table, with columns $m_{l1},m_{l2},m_{s1},m_{s2}$, S and L and remove those for which the Pauli principle removes a row. (See table in Steinfeld 'Molecules &amp; Radiation' chapter 2 and Engel &amp; Reid, 'Physical Chemistry' chapter 22). In particular you have to look out for when two rows have the same set of quantum numbers but in a different order; for example $m_{s1}$=0, $m_{s2}$=1 in one row and $m_{s1}$=1 and $m_{s2}$=0 in another but the $m_l$ values are the same, and vice versa. Doing this you should find, for example that $p^2$ has 15 terms, as $^1D$, $^3P$ and $^1S$ Hope this rather long answer helps you understand things.