Our Father in Heaven commands us to be thankful in all things, and He requires that we give thanks for the blessings we receive. We know that all of His commandments are intended to make us happy. So to be happy, we must have a grateful heart.
It is a challenge to count our blessings, because we sometimes take good things for granted. Most of all, sometimes it is hard for us to be sufficiently grateful for the greatest gifts we receive. God the Father gave His Son, and Jesus Christ gave us the Atonement, the greatest of all gifts.
Only with the help of the Holy Ghost can we begin to feel what those blessings mean for us and for those we love. And only then can we hope to be thankful in all things.
We must ask in prayer that God, by the power of the Holy Ghost, will help us see our blessings clearly. He can help us be grateful for blessings we take for granted.
Giving thanks in prayer can allow us to see the magnitude of these blessings and all of our other blessings and so receive the gift of a more grateful heart.