Multistep Registration Form
One way to do this would be to use the Conditional Fields module (disclaimer: noted as not ready for production for D7).  The way to do it with your own code would be to use the States API (the Conditional Fields module is just a GUI to States API, basically).

Using Conditional Fields, you can set it so that, for example, based on the value selected for Field A, a number of fields would be shown or not shown as per your requirements. 

EDIT: To split the form into two steps, you can use the Field Group module, which provides a "multipage steps" feature.  To configure this, you will need to create a fieldgroup of type multipage for each page you want to have on the user registration form, and then place the appropriate fields under each page (on the user account manage fields screen).

Note: The Conditional Fields and Field Group module will display everything as one giant page if Javascript is disabled.  I don't know any way around this.