Sonic and the Black Knight contains exactly 187 missions.
That number is higher than the level count suggests, because the game breaks its stages into a large set of individual missions with different objectives rather than a handful of long levels.
It is one of the reasons the title takes considerably longer to finish than its short campaign implies.