Suppose IT administration isn't too smart. They make a password policy that limits password length to three letters, and the character set is {a,b}. No empty passwords are allowed.
Then all the possible passwords are {a,b,aa,ab,ba,bb,aaa,aab,aba,baa,abb,bab,bba,bbb}. If you were counting along, that's 2 one letter passwords, 4 two letter passwords, and 8 three letter passwords. Total number is 2+4+8 = 2+(2*2)+(2*2*2) = (2^1)+(2^2)+(2^3) = 14 passwords. This count is referred to as the "keyspace." If we were to generalize this counting, we would need two parameters, the maximum password length, "m," and the size of the character set, "n." The the total number of passwords (the keyspace) is, in general,
n+(n^2)+(n^3)+...+(n^m)
In Latex notation, the summation would be
size of keyspace = \sum_{i=1}^m n^i
See cracking statistics for the next step, application to real policies