# ideal gas law modelization in a vacuum chamber

I am trying to model a pressure sensor in COMSOL. The basic work is that there is current flowing inside it, if the pressure of the gas around it drops down, the temperature goes down as well (ideal gas law) , hence there is a variation in the conductivity (described by the temperature coefficient of resistivity) so variation of current. I am figuring out that i have a vacuum chamber with a specific amount of gas (let 's say air) and then fixed volume. I then start to pumping out the gas, which means reduction of pressure and reduction of the number of molecules. I tried to use the built-in COMSOL modules (version 4.3a) but i was not able to properly describe the physics. Then I tried to use the gas law to "manually" calculate the temperature of the gas in the chamber and i have:

$PV=nRT\Rightarrow T=\frac{PV}{nR}$

but then i have two unknown parameters. I mean, i can decide to sweep the pressure (for instance simulating a drop of pressure from 760 torr up to 1E-4 torr) but i will have problem with the n (how many molecules have been pumped out from my vacuum chamber?) and viceversa. Is there a way to describe the pressure inside the chamber as a function of the number of molecules?