In this paper we present a task allocation method based on auction mechanisms that allows to find how many robots are needed to execute a task. This number is unknown and depends on several factors. There are also different types of tasks that must be executed using different skills of the robots. It is very difficult to find a correct allocation under this conditions and at present it is an open problem. We also propose two motion coordination methods to reduce the interference effect between robots. To test our system a modification of the well know foraging task has been used. This task introduces special characteristics, not directly studied in previous work, that our method try to solve.