This question was researched for RTW:
http://forums.totalwar.org/vb/showth...bodyguard-size
Thus, in RTW the factors were:
1. Being faction leader or heir or former heir
2. Personal security trait
3. Influence
Increases in bodyguard size occur gradually. Decreases in bodyguard size (e.g. due to loss of personal security) did not occur by themselves, but rather as a result of battle losses that were then not replenished.
Specifically, command did not make a difference.
M2TW does not have influence as a stat, so maybe dread/chivalry make a difference? You can imagine that either a particularly chivalrous or a particularly nefarious character would be able to attract like-minded companions...