prevents counting above maxNum