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?
Exactly.
There are times God Himself orders that the census be taken (i.e. Numbers 1 and elsewhere in Numbers, hence the reason for the book name). But I think it’s safe to say that David knew what he did was a sin (2nd Samuel 24:10). That alone, the belief that what he was doing was sin, might constitute it being sin.