What is a safe maximum amount to leave a window open?
Most code states that all railing balusters must be spaced no more than 4" apart to prevent a child from inserting their head. 

So, that is one measurement you could use...if you don't want anyone's head to get through: 4".

Of course, also make sure you can't get an arm through that could reach the window lock. 

Edit by OP:

According to http://upload.wikimedia.org/wikipedia/commons/6/61/HeadAnthropometry.JPG
Men's heads range from 5.1" to 6.5" at their widest point (and women's 5.2" to 6.1"; 1st to 99th percentile).

As such, choosing a maximum gap between 4" to 5" would prevent somebody ranging between a child and adult from entering through the space.