The only time when 'a couple' means exactly two is when it's a noun referring to two people in a relationship. If you say 'There's a nice couple living next door', this means, for example, a husband and wife, or boyfriend and girlfriend.
In most other cases, the number is less precise. The quantitive expression 'a couple of' means 'a few' - usually two or three. For example, we'd say 'a couple of days ago', if we can't remember whether something happened the day before yesterday, or the day before that.