Push adjacent nodes in graph to the queue , if not visited count the number of nodes added to the queue
for ( int i = 0 ; i < graph [ curr ] . size ( ) ; i ++ ) { if ( ! visited [ graph [ curr ] [ i ] ] ) { q . push ( graph [ curr ] [ i ] ) ; count ++ ; } }