added an alternative implementation of the triangle counting code, integrated triangle counting with Snap.py, fixed a few compilation problems