Counting and Problem Solving