When you enter a castle or town, you'll see that it have a garrison and how many units is in it.
You will also see a + or - pending if they have room for more troops or if they are above the threshold.
From looking at it, and from manageing my own clans, I belive this is based on the AI lords...