Again the anger of the Lord was aroused against Israel, and He moved David against them to say, “Go, number Israel and Judah.”So the king said to Joab the commander of the army who was with him, “Now go throughout all the tribes of Israel, from Dan to Beersheba, and count the people, that I may know the number of the people.”
2 Samuel 24:1-2

David started out as a shepherd boy who trusted God.
As a young boy/man, his family did not esteem him, probably because they were unaware that during the course of his duties as a good shepherd, he had killed lions and bears which had threatened his flock and come against him.
He had gone out in confidence against Goliath without any armor, in the face of what everyone had considered insurmountable odds.
No one else knew what he knew, what God had shown him;
It wasn’t his own strength, but his faith and trust in God Almightly that would bring him victory.
As his kingdom was established, he continued to be victorious, and as he trusted God he led Israel into an era of dominance, but then something terrible happened.
He let pride take the place of faith.
He decided that taking a census of his own strength was more important than trusting God.
He repented almost immediately– nevertheless it cost him and the nation the lives of 70,000 innocent people.

The Apostle Paul, however, had a different attitude.
He had long been dealing with a chronic issue;
although we are unaware of exactly what it was, we know that he could not fix it himself:

“Concerning this thing I pleaded with the Lord three times that it might depart from me. And He said to me, “My grace is sufficient for you, for My strength is made perfect in weakness.” Therefore most gladly I will rather boast in my infirmities, that the power of Christ may rest upon me.  Therefore I take pleasure in infirmities, in reproaches, in needs, in persecutions, in distresses, for Christ’s sake. For when I am weak, then I am strong.”
2 Cor.12:8-10

Both David and Paul came to grips with a principle that makes no sense to “natural people”- those who cannot understand God’s ways.
There is an inverse correlation at work here: The weaker we are, the more persecuted, the more infirm, the needier we become, the greater the power of Yeshua becomes that’s resting on us, and not at all for our sake-but for His glory.
We don’t have to imagine that His strength is perfected in our weakness, because God says it.
It is truth, even as it may be beyond the grasp of our understanding at the moment.
Our weakness…His strength.
Selah