Select a character in the realm you want to check, click the "realm tree" button under the character's dynasty, hover over the percentage sign next to their portrait in the window that opens. It will show you how many troops that character can have at full levy strength and how many they currently have as well as the same information for their top-liege.
And yes, the AI knows how many troops you can get.