Fix counting issue in snippet.

This commit fixes an issue in the snippet where clicking very rapidly on
the snippet could cause the displayed count to deviate wildly from the
count in Neo4j. The fix for this bug consists of only allowing the count to
increment if the state is false and only allowing the count to decrement
if the state is true.