Corrected count and reverse DFA bugs. Updated test code.