Variable question

I have a variable called ‘count’. When certain buttons are clicked, I add +1 to the ‘count’.

How would I say: when ‘count’ = 30, perform this action?

thanks