I always read it to believe that David was shifting his trust away from God and to his own military might — which was quantified by the number of fighting age men in his nation. Almost every other occurrence of a census in the Old Testament was about figuring out how many men you had on hand to decide if you should go to battle.
Yes, I agree with you... so somehow the number of people would give David a sense of self sufficiency or prideful importance, instead of a reliance upon God?