Wow, I really like this! I'm working on a bicycle-related project with my Arduino too, and was considering adding a speedo and cadence display (basically reinvent the wheel on cyclo-computers) to help fill up IO pins. To know the gear would be very cool too!
You should have much better luck with a hall effect sensor. It's output should be a clean pulse, even at very high rates. The tach sensor in almost all engines these days is a hall effect sensor that monitors a magnet embedded in the crankshaft, camshaft or distributor.
Just be careful not to put your motorcycle wheel out of balance with the magnet! :o