Improve color counting