Developing maxCount method to let user decide if maxCount variable should be used in program.
Reduced redundancy by combining a couple of methods.