Written for the CodeSprint2 competition. See the post at: http://www.angelforge.org/wordpress/programming/contest-fail/ for more information.
Given a regular expression, and a string length N, count the number of distinct strings of length N which the regular expression can match.