Dio and counting problems