Counting triangles in data streams