In this case, it is seen that due to the effect of the temperature increase, the temperature is considered as a variable since it is modifying the piston's states. In addition, as long as the piston moved upward owing to the aforesaid temperature increase, the volume is considered as the other variable by cause of its change (when the piston moves upwards the volume increase). In such a way, there are two variables, temperature and volume. Neither pressure nor number of molecules are variable since the piston is a closed system and the piston's movement allows the pressure to keep constant.