Magnetic Helicity Estimations in Models and Observations of the Solar Magnetic Field. III. Twist Number Method