Yep, you've underpriced, we all do it sometimes, just try to make sure you learn from your mistakes.
Personally i dont use a "price per window" as i cant see how it can work consistantly as every window is different, acsess, top openers, frames etc.
I walk around the house & (with experience) estimate how long it will take, then take it from there with my hourly rate.
BUT, when i do this, i estimate how long the job will take at a steady rate, allowing for acsess problems, plant pots etc & NOT how long it would take at a fast, unsustainable rate of work. Also factored into this is set up & pack up times i.e. my price is based on the time i pull up to the time i drive off.
This is my basic pricing method as there are many factors to consider i.e. if i have to drive further to a job then that job will be charged an appropriate premium.
Just bear in mind that it's your business & rates do vary for different parts of the country, even regional, as too high prices can break you aswell as make you. Pay more attention to your own work/business/pricing etc than some of the prices bantered about on here. Not that they are wrong or lying, but for example- if your an established w/c who doesn't really need any more work, or is at least very comfortable, then he can afford to price high. If he doesn't get the job so what? & for the ones he does get it's a bonus. But when your needing work & trying to build a business it can be very different. By this i'm not sugesting you work for cheap, obviousley, but rather use your noggin & think only about your personal circumstances.
Hope this helps.
tony