how the number and location of gas and fire detectors in water tube boilers can be determined?
You can find your answer in the manufacturer's installation manual for any boiler, or in any basic boiler engineering literature. There are sensors for devices which shut down the boiler for safety reasons (low gas pressure, low water pressure, flame failure etc) and sensors that provide input to the controller that operates the boiler (rate of fire, blowdown, output pressure etc). The number and configuration of sensors depends on the boiler type, capacity and application. You really should do your own homework.