The limiting factor is how much value you add to their business. That can be a lot, eg. I could easily imagine patio11 adding $50K of value in a week's time by introducing a marketing campaign that sells $500K of product, or Matasano adding that much value by fixing a security hole that would cost more than $1M in lost goodwill.
One of my fiancee's B-school professors specializes in pricing theory. He can make several million dollars in one consulting engagement, because he tells companies where they should price their products to maximize revenue, and so he just needs to charge some fraction of ($new_revenue - $old_revenue), which is usually measured in millions.
There has to be a limiting factor somewhere.