BeagleBone Black has a huge number of gpio pins, it's one of BeagleBoard's major selling points over RasPi at this point. I'm fairly certain the BeagleBone Black has more gpio pins than the Arduino.
BeagleBone Black also has a real-time module (effectively, a limited microcontroller on the same die as the CPU), which I expect could make for some sweet libraries.