An explicit formula for the number of tunnels in digital objects