Of course they can't - they're birdbrains! Right?
Ducks certainly don't have a reputation for being bright. Not like rooks & magpies, or parrots like our own kea, for example. And why would a duck need to count anyway?
Enter optimum foraging theory (& many thanks to Brendan Hicks for putting me onto this one). This behavioural ecology concept predicts that animals looking for food will put in the most effort where they get the best returns i.e. they'll spend most of their feeding time in areas where there's the most food. This sounds rather self-evident to us - but how do animals actually know where these areas are? How do they assess food availability? And how good are they at distinguishing between areas with different amounts of food? It's been known for some time that animals are capable of this (Talbot & Karmer 1986, cited in Kennedy & Gray, 1993):
The remarkable ability of groups of animals to divide themselves rapidly and precisely among two or more feeding sites in proportion to their rate of food delivery results in one of the best matches between theory and observation in contemporary behavioural ecology.
Optimal foraging theory lets researchers study situations where the distribution of resources is known, and make predictions about the distribution of animals using that resource. Ducks are a good subject for such an experiment: they're common, easy to find and observe - and they love bread :-) The theory predicts that, given two people feeding ducks at different rates, the ducks should be able to calculate which person to go to in order to get the most food. Russell Gray & Martyn Kennedy (1994) tested this with mallard ducks on the Leith River in Dunedin.
They noted that other studies found that animals didn't always use habitat in the way predicted by optimal foraging theory: they tended to overuse areas with fewer resources and under-use areas with plenty of food. Gray & Kennedy suggested that this might be due to limits in animals' ability to perceive differences (their 'perceptual limit').
First they got the ducks used to being fed at a particular time of day, so that there would always be around the same number of ducks present. Then they began their test feedings: the researcher at one site delivered food to the ducks 6 times faster than the other researcher 16m away. And they found that overall, more ducks went to the site with the high feeding rate. The relationship wasn't perfect, suggesting that the ducks weren't completely accurate in their ability to distinguish which site offered the maximum feeding potential, although it's also possible that squabbles between the ducks also had an effect on their distribution.
So - ducks aren't the intellectual giants of the avian world, but they do have some ability to 'count'.
R.D. Gray & M. Kennedy (1994) Perceptual constraints on optimal foraging: a reason for departures from the ideal free distribution? Animal Behaviour 47: 469-471
M. Kennedy & R.D. Gray (1993) Can ecological theory predict the distribution of foraging animals? A critical analysis of experiments on the Ideal Free Distribution. Oikos 68: 158-166