We consider the shortest-path-counting problem (SPCP), which asks how many shortest paths is each edge of a network contained in? There are n(n−1) shortest paths in a network with n nodes, so among all these shortest paths the SPCP requires us to count the number of shortest paths passing through each edge. We obtain theoretical results in the form of explicit expressions for special types of networks such as trees, grid type, circular type, etc. We apply the SPCP to measure the importance of city road segments, which will certainly contribute to estimate the traffic congestion of the city road segments. Then we propose a quantitative method for evaluating the stable connectedness of the network-structured system using shortest-path-counting methods. We define the stable-connection function and the expected stable-connection function for the network-structured system. Then we derive some theoretical results for some special types of network such as single path, cycle graph, and complete graph. Several properties and characteristics of the stable-connection function are also shown with some theoretical results. We show the application of the Monte Carlo method to estimate the expected stable-connection function. This method can be applied to measure the strength of connectedness of the Japanese road network system.