Cycles Shader to assigns a color based on how many light sources hit the surface
This is possible using the Toon shader which can be set to produce completely 'flat' shading that is only dependent on the incident lamps. By also setting the lamps to 'Constant' shading the effect of each lamp can effectively be clamped to a constant contribution for each visible lamp.

Start by setting your lamps to 'Constant' illumination :



Adjust the Light Falloff node to adjust the Strength of the lamp. This will result in each lamp contributing the same illumination to a surface regardless of distance.

For the mesh material, use the Toon shader with the Size and Smooth values set to 1.0 to give completely 'flat' shading. Also, set the Render properties Light Paths for 'Bounces' to zero as we don't want to take account of any bounced rays :



This can produce the following result :



Blend file included 

Note that you may also want to reduce the lamp size from the default size so as to ensure sharp shadow edges.