number of connected components in an directed graph