It's the thought that counts.
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.
Follow PhraseMix