IMO, you count the monster HD separately from the class HD when determining feats and ability increases.
For example, a Trumpet Archon (Outsider, 12 HD) has 4 feats, for 1st, 4th, 8th and 12th "level". If this archon would gain three class levels, the archon can choose one feat; upon gaining...