These functions probably make the script harder to read.

This is the 'traditional' way:
typeset -i OK
OK=0
OK=$OK+1