We investigate how to count the number of solutions in the Boolean satisfiability (SAT) problem, a fundamental problem in theoretical computer science that has applications in various domains. We convert the problem to a spin-glass problem in statistical physics and approximately compute the entropy of the problem, which corresponds to the logarithm of the number of solutions. We propose a new method for the entropy computing problem based on a combination of the tensor network method and the message-passing algorithm. The significance of the proposed method is its ability to consider the effects of both long loops and short loops present in the factor graph of the SAT problem. We validate the efficacy of our approach using 3-SAT problems defined on the random graphs and structured graphs, and show that the proposed method gives more accurate results on the number of solutions than the standard belief propagation algorithms. We also discuss the applications of our method across a wide range of combinatorial optimization problems.