I understand that it is a mitzvah to count the 49 days of the omer from the second night of Pesach through erev Shavuos. But what is the spiritual value of counting s'fira? I.e. what does G-d want me to achieve by doing this mitzvah, if we know?
The Chinuch (306, in my own translation) says:
A theme frequently expressed by the Chinuch (and some others), though not made explicit here, is that a person's actions make him into a person who tends to do those actions. (I know little about cognitive behavioral therapy, but I think this is the basic principle underlying it, too.) Here, then, I think he is trying to say that, by counting the omer as if yearning for the Torah, we will come to yearn for it in fact.
Rabbi Samson Raphael Hirsch, in Horeb (paragraph 214 in Rabbi Dr. Grunfeld's translation), says similarly: