CountDiv ruby solution