Boneyard Wurm's power and toughness are each equal to the number of creature cards in your graveyard.
The ability that defines Boneyard Wurm’s power and toughness works in all zones, not just the battlefield. If Boneyard Wurm is in your graveyard, it will count itself.