Yes, they convey different meanings.
- I didn't have many apples.
- I had few apples.
Simply put, sentence one conveys the meaning that the speaker didn't have as many apples as it would take to call the apples "many". Sentence two tells us that the speaker had a small number of apples.
They could mean the same, but they do not. "I didn't have many" means "I had less than what could be called many". That has a broad meaning: I could be having a relatively large amount of apples, but not as many that would fit the label "many". However, "I had few" means "I only had a small number". It couldn't imply the meaning "I didn't have many" represents. In other words, sentence two implies sentence 1, but sentence 1 has a more general meaning. Take a look at the diagram I draw to get a better picture. A more elaborate description is given below.
Technically . . .
More info on this can be found on Cambridge Grammar of English Language §5.2 — scalar entailments and implicatures; page 366–368.
CGEL points out that negating "many" results in a paucal implicature.
It's useful to compare this pair to the more restrictive negative quantifier "no". Indeed, "few" is the opposite of many; but "not many" is not as restrictive as them. Compare these four instances:
- None of the sailors tried to defend their captain.
- Few of the sailors tried to defend their captain.
- Not many of the sailors tried to defend their captain.
- Not all of the sailors tried to defend their captain.
We can apply what's been said here. "None" is the most restrictive,; "few" is less restrictive than "none" but still more than the other pairs, "not many" is only more restrictive than "not all".
Hence, we can say that if sentence one is true, so are others. If sentence two is true, then so are 3 and 4, but we can't judge whether one is correct or not; and the same story goes for three and four. If we know that not all of the sailors helped their captain, we can't necessarily judge whether none of them helped the captain, or there were only a few exceptional sailors that didn't help the captain.
However, it should be noted that this difference in meaning is very subtle and may go unnoticed, since this was all about implicatures: context-dependent. We can conclude that the sentences do not convey 'precisely' the same meaning, although the difference is passable in most cases.