In each chapter there are optional levels. After finishing them you get a reward - sometimes an extra life, but other times a special item needed for finishing the story. Different combinations of items allow you different items.
I'm still working through the multiple endings. All I know so far is as follows:
If you do all optional levels PLUS go through the Counts Castle (as opposed to the boneyard), you will receive all the things you need for a "perfect" ending.
If you do all the optional trips but go through the boneyard instead of the castle, you get a happy ending, but not a fancy wedding - you have to elope.
As I get more things figured out I'll post them as "
Spoilers" - invisible unless you highlight the text.