p = DPI * i

p = number of pixels
i = number of inches
DPI = dots per inch.

Perhaps this isn't what you're looking for. I'm not sure I understood. :)