that code is correct for binding the column to the ColourCount variable.
if it is not working, I would double check that:
1) the variable is actually getting set the way you expect
2) The code to set the variable is before the add to cart code.
3) The recordset that is used in this script needs to be before the script.