21 Cubes and 4 Anti-cubes.
I'm getting two impressions:
1.) Cubes are gained primarily by platforming for the most part while Anti-cubes are gained by the more hardcore, and somewhat "meta" puzzles you just have to find, figure out that they're puzzles, and then figure out the solution.
2.) They're interchangeable. I imagine the 32 cube door is the game ender, and you can miss cubes and replace them with anti-cubes. Maybe there's post game goals revolving around 32+ more cubes? All I know is my save tells me I'm over 75% complete.