You can NOT hide the number of resource cards that are in your hand, so the premise in your question is incorrect.
From the rules, page 8, under Knight Cards:
However, you can always ask players about the number of cards they hold.
And from the Official FAQ:
Resource Cards - Am I obligated to tell my opponents the number of Resource Cards in my hand?
This combined with the rule
Keep your development cards hidden (in your hand)
suggests that the number of development cards is also public.
While the rulebook and FAQ are not completely clear on this point, it seems to be the logical conclusion based on those other rules. Whenever I have played, players generally keep unplayed development cards face down in front of them, as keeping them in your hand would cause problems when cards are being stolen, or when counting how many resource cards you have, etc. Knowing which players have how many unplayed development cards is usually an important part of the strategy.