I view the set of programmers as a subset of the set of developers. A user interface developer might not do any programming at all, but still be essential to the project. As an example from the gaming industry: the development team would have many people, with some contributing to the game layout, some to sound effects, some by testing the reliability, and some by programming. I'd include them all when asked how many developers there are in the team.
In the industries I have been involved in, the term we used most often was "engineer", even when the person did just programming. But that probably had to do with the field I worked in.
In general, I would prefer "developer" or "software developer" in formal language (in a résumé, or a report, for example) and "programmer" in informal, spoken language ("A programmer went into a bar and said...").