“Well, it's the thought that counts.”
Your cousin sent you a birthday present. It was a book, but you're actually not interested in reading that book at all. Even though you don't like the gift, you're happy that your cousin sent you something. You think this to yourself.
Well, it's the thought that counts.
One reason for saying "well" at the beginning of a sentence is to show that you're unsure about something.
This can happen when someone asks you a question that you don't immediately know the answer to:
A: What are you doing this weekend?
B: Well, let's see... Oh! I'm having lunch with Gavin on Saturday.
It can also happen when you're trying to say something nice, even though you're thinking things that aren't nice.
A: What do you think of Lana?
B: Well... she's... always very punctual.
You shouldn't use "well" in this way in formal written English.
This is a set phrase that English speakers use to talk about gifts. It means that it's OK if a gift isn't perfect; the purpose of giving someone a gift is just to show that you care about that person.
People say this when someone gets a gift which doesn't match what they wanted.