A beam of light for detecting the amount of the remaining toner (which hereafter may be referred to simply as detection light), which is emitted from a light emitting portion, such as an LED, attached to the main assembly of an image forming apparatus, is guided through a light guide (unshown) attached to the image forming apparatus or the toner container 141 of a process cartridge, and then, into