Default number of nodes is 3. Can i build a circuit of 5 or 6 nodes? (using whonix)
You'd need to compile Tor from source - this is not a configuration change.
However, this isn't a great decision - Is it possible to make the Tor onion-routing path longer? has a few answers about this topic.
While this would not not necessarily affect your anonymity it would make tor slower and eat more node bandwidth. This means there would be no real gain, only more unnecesary issues.