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 four class levels, the archon receives an ability increase.
On contrast, if you would (wrongly) add monster HD and class HD together, the archon would receive one feat (1st, 3rd, 6th, 9th, 12th) and three ability increases (4th, 8th, 12th) immidiately upon gaining one single class level.