I want to restrict the number of hits to a particular limit. for example, if the number of hits to a virtual service exceed more than 10 in a minute. service should respond with an error.
May I ask why? What testing purpose ?
This can be taken care of pretty simply by adding a script step to your VSM. But, I'd echo Mark's concern. What are you trying to achieve? SV is not about creating a production stand-in - it's a tool for testing.
--Mike