add the COUNTERRANGE subroutine