Count-based imaging model for the Spectrometer/Telescope for Imaging X-rays (STIX) in Solar Orbiter