count variable being used where it needs to be used now