In raw SQL, the query would look something like this:
SELECT Post.* FROM Post LEFT JOIN Comment ON Post.id = Comment.post_id GROUP BY Comment.post_id HAVING COUNT(Comment.id) < 2
Most of them are easy to translate to Cake:
array( 'having' => array('COUNT(Comment.id) <' => 2), 'group' => array('Comment.post_id') )
Cake does not automatically join hasMany tables; this is what you need to do manually. See the documentation for details.
Edit:
You can make a suggestion as follows:
array( 'group' => 'Comment.post_id HAVING COUNT(Comment.id) < 2' )
string restrictions are only for the group and are impossible without the group. Cake 3 will probably contain more SQL syntax like having
source share