My son is 9 months old and just won't be still while feeding. It's to the point where I can barely get him to stay latched, he keeps turning his head to look at other things, and I can't tell if he's had enough milk or not. I wanted to wait until one year to stop breastfeeding but I don't know how much longer I can continue like this.
He's going to eat enough, barring substantial physiological problems that it doesn't sound like apply here. This was true at one month old, is true now, and will be true at 3 or 4. Kids don't starve themselves, whatever their difficulties with appearing to eat a normal meal are. As long as you're not replacing those calories with candy or potato chips, so all of his food options are nutritive ones, don't worry about the nutrition side of things. Kids (like adults) have physical cues that tell them when they should be eating more or less, that make sure they get a sufficient minimum quantity of food.
As such, if you want to wean him, go ahead; if you don't want to, don't. A lot of it depends on your preference, and whether you can handle him being so squirmy. Health-wise, it is probably better for him to continue nursing for a portion of his calories until at least one (and even 1.5-2), due to the other benefits of breastfeeding, but it's not a dramatic difference; so if the squirming is getting to the point that it's stressing you out quite a lot, let it go.
This is a pretty normal stage right around 9 months give or take a few months, because babies start being able to move more (crawl, walk, etc.) around then, and their mental development also hits a higher gear around 9-12 months - so they're more interested in what is around them. As was alluded to in comments, a less stimulating environment may be necessary to help keep this under control; but to some extent you may just have a happy, active baby who likes to move and see what's going on around him.
Other things you can do include talking to him to keep his attention - singing, telling him stories, etc.; stopping nursing when he reaches a certain point of squirminess, hoping to make it clear to him that squirming leads to stopping nursing; putting a blanket on him to keep him warm; and adjusting your nursing times. By 9-10 months, my wife was primarily nursing in the early morning (upon waking up) and right before bed, both times when our babies were sleepy and less likely to squirm about, for example.
Weaning is a personal choice for you and him. There is no magical date, but if you feel like he's ready and you're ready, then congratulations: you've done a great job.
If you're concerned about how much he's getting, you could give him known quantities of expressed milk in a cup or bottle-- but since you've been feeding him for so long, you can probably feel how much he's gotten. He may be looking around because he needs more interaction and sensory stimulation as he's growing up. You may find that talking to him or singing to him makes it more fun for him. Sounds like it may be time for a slow wean.