I moved away from detecting the pinch motion on the basis that when you pinch two fingers together, the leap motion stops tracking them (check the leap visualiser).  This means the only thing you'd have to go off is the hand, and you'd have to hope the only time you pick up new fingers is when you release the pinch.

Here I'm passing the position of the hands while someone is trying to carry out a zooming action, I've got it to alter the pointers it sends depending what the user is doing e.g when we've had a pointer down event (and so @_dragging is true) the user is probably only interested in what they're dragging about.