The lack of advancement of the mileometer part of the speedo is probably down to wear. The erratic action of the needle is more likely to be snatching of the inner cable which might rectify if you withdraw the inner and give it a smear with some graphite based grease. The digits in the counter advance by a ratchet and pawl which may be worn or possibly blocked by old grease that has hardened. If you're up to taking it apart you may be able to see why it's not working.
There are people who can repair/refurbish speedometers if your pockets are deep enough.