# Countdown Variable based on Submit Count

I want to make a countdown for the students of how many more tries they have before they get a hint. I know how to get the submit count, but is there a way to subtract the submit count from how many tries they get?

Here is my code so far.

hidden: not(practice22.submitted)
submitCount = practice22.submitCount

content: when practice22.numericValue = 226.08 “Great job! Now add those numbers to find the total area of the shape.”
when practice22.submitCount >= 3 “To find the area of the semicircle start with A=\pi r^2. Use 12 as your radius. This gets you A=(3.14)(12)^2. Then divide you answer by 2.”

     when practice22.numericValue = 840 "That was the area of the rectangle."

otherwise "Keep trying If you can't get it after ${submitCount} more tries you'll get a hint." Any calculations done in CL need to be done with numericValue( ) or simpleFunction( ).evaluateAt( ). tries=5 tLeft=numericValue(${tries}-\${submitCount})