Get NUM_INSTANCES from env var

So the git repo doesn't get dirty...
Merge pull request #64 from mattbailey/patch-1

Get NUM_INSTANCES from env var