Triad census for networks