Spain has more vineyards than any country in the world. Yet Spain produces less than half as much wine as the world's two leading producers, Italy and France. It's a question of geography and climate.

Most of Spain's vineyards are in arid highlands, often where little else but vines could grow. The largest wine region is La Mancha, Don Quixote's fantasyland. It is a gigantic plateau stretching across central Spain that produces 20 percent or more of Spanish wine. The other major regions are along Spain's long Mediterranean coast, whose hot, dry, sunny climate results in fewer and smaller grapes.

The second major reason for low production is the high toll taken by maladies affecting the vine. Spanish summers are normally dry, but if the rain falls on the Spanish plain, all too often the small Spanish vineyard owner is not prepared to treat its consequences.

Mildew, a fungus, attacks vines very quickly during wet periods, killing leaves and totting grapes. To prevent mildew, a solution of copper sulfate (don't be alarmed) is sprayed on the vines after it rains. In an average year, few treatments are needed, but an unusually rainy summer may necessitate 10 to 12 treatments.

The chemicals and the equipment needed to apply them are expensive, and since the return to the viticultor for his harvest is often very low, their use is not as widespread as it should be. Mildew strikes every year and in some rainy vintages the loss of grapes can be catastrophic. In 1977, frost damage and mildew cut the harvest to hardly more than half of a normal crop.

Low yields can also be attributed to old and decaying vineyards. Vines are capable of producing normal amounts of grapes of good quality from their third or fourth year until a certain age, 25 to 50 years, depending on the grape variety. Then the quantity the vine produces begins diminishing. In many regions, the vineyards are old and unevenly planted. Replanting with modern vines that are more resistant to disease and have higher production is necessary. But the cost can be prohibitive for the small viticultor.

In areas of northern Spain such as the Rioja and Catalunya, the full potential of the grapes is realized because of good winemaking techniques. However, most other spanish regions produce a great deal of mediocre wine.

This is drunk as vino corriente, literally running wine, Spain's equivalent of vin ordinaire; exported in bulk to France and the rest of Europe to be blended into their table wines; or mixed with fruit juices to make sangria for the summer tourists and export market.

Indeed, Spanish wine has long suffered from an image problem from which Rioja and the Penedes have had to extricate themselves. But now as Spain prepares to join the Common Market, and its economy begins developing and modernizing, the Spanish wine industry is caught between two worlds. On the one hand, it continues to compete with lesser developed countries such as Argentina and Algeria in what has become a world market for cheap table wine. On the other hand, it wants to compete with France, Italy and Germany in the world market for quality wines.

At present, 85 percent of Spanish wine is exported as vino a granel, meaning unbottled or in bulk, and only 15 percent in bottles. With Spain's inflation rate of 25 percent and the asking price for vino a granel severely restricted by market conditions, the small viticultor is barely surviving in many parts of Spain.

The answer to this predicament seems to be to produce more wine of better quality that can be sold in bottles at higher prices than vino a granel. Reaching this goal will be a long, arduous and costly process.

One of the most vocal spokesmen for moderizing the Spanish wine industry is Miguel Torres, who is not only occupied with managing his family's bodega, but also has been active in promoting the wines of Penedes and of Spain. He has just written a book in Spanish titled, "Vino Espanol: Un Incierto Futuro" (Spanish Wine: An Uncertain Future). In it he takes a critical look at the Spanish wine industry and makes suggestions for improving its competitive position.

Torres does not balk at attacking traditions. As in France, irrigation of vineyards to increase production is strictly forbidden. Torres believes this is impractical for Spain because its climate is much drier. He argues that in many regions of Spain production could be doubled without any loss of quality. The major impediment to improving wine quality, however, is lack of the large amount of capital necessary to finance modernized wineries.

In Spain, it is usually still hot at the time of the harvest in September. Not too long ago it was impossible to control the fermentation process in warm climates, but the advancements in the technology of oenology now make it possible to ferment wine in central Spain at the same temperature as in Burgundy or Germany. However, the stainless stell fermenting tanks, refrigerating units, and other equipment that help to produce fruity whites and roses and better balanced reds, are extremely costly.

Even as Spain begins producing better wines, there is still the problem of changing the "image" of Spanish wines and getting Americans to recognize producers and regions. The Spanish government had never mounted promotions of its wines here comparable to the efforts of the French and Italians. It currently subsidizes 15 percent of the advertising and promotion expenses of individual exporters. In addition, a large-scale campaign may be necessary.

Despite the steady increases in America's wine drinking, imports of Spanish wines actually have decreased over the past five years. This is due solely to the enormous decline in sangria sales. In 1974, at its peak, over 3 million cases were imported, but by 1977 this figure had dropped to just under 1.5 million cases. At one time the two leading brands of Spanish sangria, Yago and Real Sangria Cruz Garcia, accounted for 85 percent of our imports of Spanish wines. Each year the figure declines as imports from Riojas, Penedes, and other regions grow. That trend probably will continue and as the American consumer searches for good values on store shelves, he will increasingly find himself considering Spanish wines.