It's a question we face quite often. And one that is not easy to answer. Unlike vertebrates, insects often exhibit behaviors that would seem to suggest that they don't "care" when they are physically harmed. For example, in horribly macabre experiments, cockroaches have been found to survive for weeks, and respond to stimuli, without their heads. And the invertebrate nervous system is, in general, less centralized than that of vertebrate animals.
But does this imply that insects "don't count"? Brian Tomasik summarizes the literature in a wonderful article on insect pain. One choice excerpt:
Strangely, I believe that cockroaches are conscious. [Moreover, ...] I believe that many quite simple animals are conscious, including more attractive beasts like bees and butterflies.
[... What I mean by consciousness is] the feeling of seeing the world and its associations. For the bee, it is the feeling of being a bee. I don't mean that a bee is self-conscious or spends time thinking about itself. But of course the problem of why the bee has its own feeling is the same incomprehensible hard problem of why the activity of our nervous system gives rise to our own feelings.
But at least the bee's world is very visual and capable of being imagined. Some creatures live in sensory worlds that are much harder to access. Spiders that hunt at night live in a world dominated by the detection of faint vibration and of the tiniest flows of air that allow them to see fly passing by in pitch darkness. Sensory hairs that cover their body give them a sensitivity to touch far more finely grained than we can possibly feel through our own skin.
[...] And as for the cockroaches, they are a little more human than the spiders. Like the owners of the New York apartments who detest them, they suffer from stress and can die from it, even without injury. They are also hierarchical and know their little territories well. When they are running for it, think twice before crushing out another world.
The upshot? We don't know for sure if insects are sentient. But even if there is a small chance that they are, it's worth taking them into consideration.