This method does not require any script. Assuming the result of the formula is on the same row (eg. G1), the following formula will do the job and is extendable to rows below:
=COUNTTEXTCOLOR(CONCATENATE(ADDRESS(ROW(),1,4),":",ADDRESS(ROW(),6,4)),"#ff0000")