There are four ducks: (in a single file row)
The front two ducks are "in front of two ducks"; the rear two ducks are "behind two ducks"; and the central two ducks are between the duck at the front and the duck at the end, hence they are "between two ducks".