An image processing apparatus , comprising: a printer unit configured to print an image on a sheet; a network interface ; and a controller configured to control modes of the image processing apparatus , the modes including a first mode in which power is supplied to the printer unit and a second mode in which power is not supplied to the printer unit or lower power is supplied to the printer unit than in the first mode, wherein the controller is further configured to: acquire device information via the network interface from devices connected to a network , count the number of the devices connected to the network, calculate a statistical value for the counted number of the devices connected to the network based on a previous number of devices connected to the network at a previous time, control the modes of the image processing apparatus based on the counted number of the devices and the calculated statistical value, and maintain the first mode when the counted number of the devices and the statistical value satisfy a predetermined condition, characterized in that : the statistical value is an average value of the counted number of the devices at a plurality of previous times, and the predetermined condition is satisfied when the counted number of the devices is greater than the average value. a printer unit configured to print an image on a sheet; a network interface ; and a controller configured to control modes of the image processing apparatus , the modes including a first mode in which power is supplied to the printer unit and a second mode in which power is not supplied to the printer unit or lower power is supplied to the printer unit than in the first mode, wherein the controller is further configured to: acquire device information via the network interface from devices connected to a network , count the number of the devices connected to the network, calculate a statistical value for the counted number of the devices connected to the network based on a previous number of devices connected to the network at a previous time, control the modes of the image processing apparatus based on the counted number of the devices and the calculated statistical value, and maintain the first mode when the counted number of the devices and the statistical value satisfy a predetermined condition, acquire device information via the network interface from devices connected to a network , count the number of the devices connected to the network, calculate a statistical value for the counted number of the devices connected to the network based on a previous number of devices connected to the network at a previous time, control the modes of the image processing apparatus based on the counted number of the devices and the calculated statistical value, and maintain the first mode when the counted number of the devices and the statistical value satisfy a predetermined condition, characterized in that : the statistical value is an average value of the counted number of the devices at a plurality of previous times, and the predetermined condition is satisfied when the counted number of the devices is greater than the average value. the statistical value is an average value of the counted number of the devices at a plurality of previous times, and the predetermined condition is satisfied when the counted number of the devices is greater than the average value. <EOS>