There are 24 Heart Pieces in Total throughout Skyward Sword. Six of the Heart Pieces can be found in treasure chests by activating Goddess Cubes.
All Heart Pieces:
Heart Piece #1
Faron Woods - After getting the Slingshot from the Elder Kikwi, head across the gap on the vine. Head straight under the bridge, take a left and go up the ramp. At the top of the ramp to left and cross the tightrope to get the Heart Piece.
Heart Piece #2
(Goddess Cube) Deep Woods - Immediately after getting the first Goddess Cube head down towards the temple and activate the Goddess Cube to the right. The Heart Piece can be found on an island in the sky south of Skyloft.
Heart Piece #3
Skyview Temple - In the main room after you get the beetle, fly to the top of the middle structure and there is a switch that opens a gate in the back side of the main structure where the heart piece is.
Heart Piece #4
Pumpkin Landing - On a chandelier inside the Lumpy Pumpkin. Roll into the pillar holding up the chandelier to knock it down.
Heart Piece #5
(Goddess Cube) Eldin Volcano - When you're sliding down the huge sand slide get on the platform to the left with the air vent and jump down to the next platform to get the Goddess Cube. To unlock the treasure, you'll need to be able to swim to get to the treasure in the middle of Skyloft.
Heart Piece #6
Eldin Volcano - In the southwest area. When you come to the bridge across the lava keep heading around to eventually get to the heart piece.
Heart Piece #7
Lanayru Desert Temple of Time - Just outside the temple of time there is a mine cart that you activate that goes right past a Goddess Cube, you must activate it while riding in the cart. The chest is on Beedle's Island.
Heart Piece #8
Lanayru Desert - In the northeast corner. You will see an loop on the map and right where it starts is a bombable wall. The heart piece is in a treasure chest down the hall.
Heart Piece #9
Pumpkin Landing - You will receive this heart piece after completing all three tasks for the owner.
Heart Piece #10
Skyloft Batreaux's House - Bring Batreaux 10 Gratitude Crystals to get this Heart Piece.
Heart Piece #11
Fun Fun Island - Score a perfect score during the Fun-Fun Mini-Game to get this Heart Piece.
Heart Piece #12
Faron Woods Bombable Wall
Heart Piece #13
Shipyard - Beat the Mine Cart Mini-Game in less than 65 seconds to get this Heart Piece.
Heart Piece #14
Pirate Stronghold - After completing the Pirate Stronghold area, there is a clawshot on the building after the mouth opens. Climb up to the top to unlock the Goddess Cube. The chest is in Skyloft on the east side where the floating waterfall is. Use the clawshots to get up there.
Heart Piece #15
Heart Piece #16
Heart Piece #17
Heart Piece #18
Faron Woods Goddess Cube
Heart Piece #19
Fire Sanctuary Goddess Cube
Heart Piece #20
Heart Piece #21
Heart Piece #22
Draw on wall
Heart Piece #23
Heart Piece #24
Lanayru Gorge (Boss Rush Mode) - After reviving the Thunder Dragon you'll be able to talk to him and play the Boss Rush Mode Mini-Game where you fight bosses from throughout the game. Beat four in a row to get the Heart Piece.