1. A method for controlling an image forming apparatus, comprising: reading an original image to which a copy-forgery-inhibited pattern and copy restriction information are added, the copy-forgery-inhibited pattern including a latent-image part and background-image part, the copy-forgery-inhibited pattern not being used in order that the image forming apparatus restricts a number of times of generation copy, when the copy-forgery-inhibited pattern is copied, the latent-image part in the copy-forgery-inhibited pattern appears in the copied image, the copy restriction information being used in order that the image forming apparatus restricts the number of times of generation copy; analyzing the copy restriction information read from the original image; generating an image in which the copy-forgery-inhibited pattern is removed from the original image in a case where the copy restriction information indicates that next generation copy is allowed; updating the number of times of copying contained in the copy restriction information; generating copy-forgery-inhibited pattern image data representing a copy-forgery-inhibited pattern; and forming, on a sheet, an image in which the copy restriction information updated and the copy-forgery-inhibited pattern image data generated are added to the original image from which the copy-forgery-inhibited pattern has been removed.