Gartner Dataquest’s Software research group has traditionally measured market share in terms of new license revenue. However, due to the emergence and increasing popularity of open-source software and buyer consumption models such as hosted and subscription offerings, Gartner has moved to measure market share in terms of total software revenue which includes revenue generated from new license, updates, subscriptions and hosting, technical support and maintenance. Professional services and hardware revenue are not included in total software revenue. — Gartner Group
The way that market share has been determined varied greatly on which research group you asked. Years ago, the computation might have been stacked to one vendor or another depending on whom is paying for the study. There were allegations of data manipulation by the Gartner Group when the DOJ vs Microsoft trial was going on regarding the feasibility studies of Linux vs Microsoft Windows for the enterprise. Thankfully, the days of buying the results that you want are mostly behind us due to people asking the question, "Exactly who paid for the study?"
Thanks to Anthony Mandic for pointing to the press release from the Gartner Group!