initial version of simple and optimal triangle count