Fix to only assign the minimum length to the rules count when it is valid and at the default of zero
Merge https://github.com/amageed/Regextra