Calculate total pixels

Calculate total pixels