It's no secret that Costco (NASDAQ:COST) generates almost all of its earnings from membership fees as opposed to retail sales. Yet I think few people appreciate the impact this has when analyzing the company's stock. In short, because Costco seems to operate as a membership company first and a retailer second, traditional retail metrics like same-store sales, revenue growth, and gross margin should take a back seat in an analysis to the statistics that shed light on membership fees.

Total number of members
The first such statistic is simply the total number of members. Since 1995, Costco has increased its membership base by a factor of four, going from 10 million primary members two decades ago to over 40 million today. Each of these households or businesses pays a minimum of $55 a year for the privilege of shopping in Costco's warehouses.

There's no hard-and-fast rule governing the rate at which Costco adds new members. If you look back over the past two decades, the figure has grown at an average annual rate of 7.1%. Excluding recessions, it's 8.8%. And if you look at growth rates on a year-over-year basis, the figures are all over the board. In 2009 and 2010, for example, Costco grew its primary membership base by 5.4% and 4%, respectively. But the following year it spiked to 10.6%.

When a recession throttles the retail industry, you should expect the growth in Costco's membership rolls, and thus its net income, to follow suit. But far from being lost, growth is typically recaptured as the economy recovers. In all other years, Costco has tended to expand its membership base by anywhere from 6% to 9% a year.

The composition of Costco's membership base
In addition to the number and growth rate of members, the composition of its membership base is of nearly equal importance.

In 1998, Costco began giving Gold Star and Business members the opportunity to become Executive members. In exchange for paying twice as much in annual dues, the new program originally gave members the "opportunity to save on various services, including merchant credit card processing; auto and homeowner insurance; employee health insurance; real estate and mortgage services; and long-distance telephone services."

Costco has since added to the benefits of its premium membership. Today, beyond the services just mentioned, Executive members get what amounts to a 2% rebate on purchases made at Costco warehouses.

With this in mind, a second way for Costco to increase total membership fees (and thus earnings) is to encourage existing members to pay $110 for Executive status as opposed to $55 for its baseline Gold Star or Business memberships. And, not surprisingly, this is exactly what Costco is doing. Since 2006, its Executive members have grown from 20% of total members to 39% today.

The price of all Costco memberships
Along these same lines, it's worth pointing out that the price level of all Costco memberships, whether regular or Executive, also factors into the company's cumulative membership fees and its bottom-line earnings.

To be clear, raising prices solely to boost revenue isn't a tactic that Costco embraces. Over the past 20 years, it's raised membership prices only four times -- in fiscal years 1998, 2000, 2006, and 2012. These increases have only slightly more than kept pace with inflation. As the chart below illustrates, if you adjust the historical price of a Gold Star membership for changes in consumer prices, the former's real price falls in the intervening years between increases.

The role of new warehouses
Finally, I'd be remiss if I didn't mention the role that new stores play in Costco's efforts to grow its membership base. While it would be oversimplifying the case to say that "if Costco builds a location, new members will come," that's largely what it amounts to.

You can infer this from two facts. The first is that Costco does little marketing aside from distributing monthly coupon books and its magazine, The Costco Connection. As the company noted in its latest 10-K:

Marketing activities generally include community outreach programs to local businesses in new and existing markets and direct mail to prospective new members. Ongoing promotional programs primarily relate to coupon mailers, The Costco Connection (a magazine we publish for our members), and emails to members promoting selected merchandise.

You also get a sense for the magnetic attraction of new warehouses from the simple fact that, even in its inaugural year, a typical new location will gross $100 million or more in sales. The 30 warehouses opened in 2014, for instance, sold an average of $108 million worth of goods and services in their first full year of operation. It's hard to say how many members that translates into, but as a frequent Costco shopper myself, I can tell you that it's a lot.

Tying it all together
If I've done my job, then current and prospective investors in Costco should begin to see the company for what it truly is -- a club that makes money by selling memberships -- as opposed to what it seems to be -- a retailer that makes money hawking products and services. As such, any proper analysis should be informed first and foremost by changes to the size and composition of Costco's membership base. It's only after that that one should venture into an analysis of the traditional retail benchmarks.

John Maxfield has no position in any stocks mentioned. The Motley Fool recommends Apple and Costco Wholesale. The Motley Fool owns shares of Apple and Costco Wholesale. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.