Across the Devil May Cry series, the count is given as 20 levels.
Each entry splits its stages between the main campaign and the post-game content, so how a level is counted can shift slightly depending on who's tallying.