On Valentine's Day, the fifth anniversary of the highly successful "I Love New York" campaign, it's obvious where Mayor Edward Koch's heart lies.

To those who know Mayor Koch and his town, his warm invitation to Washington-area residents to visit New York City runs much deeper than a pro forma official pronouncement from the steps of City Hall. It reflects the pride and contagious joy most New Yorkers take in the Big Apple, as evidenced by the support given to the continuing promotional campaign and their enthusiastic desire to show their city off to visitors.

Mayor Koch really means it when he says "We love our town and we are delighted when others have a chance to sample the menu" --which is not to say that his boyish enthusiasm, which also sparks New York City's approach to tourism, is completely altruistic.

As the mayor is quick to point out, tourism is the city's major industry, an industry that includes and embraces all the elements that make this a great metropolis. And it is also an industry whose well-being directly affects the New York City budget, its employment statistics, taxable income and economic health.

There is no question that New York is one of the most exciting cities of the world, probably because it has so much of everything the tourist wants and needs. But here facilities are generally bigger, as well as being in greater concentration, than the traveler can find in any other one place, from tantalizing nourishment for the mind and body to the fanciest and costliest (and most modish) of fashions.

In the matter of hotels, for example, with more than 100,000 first-class rooms, New York City has more hotel space than London and Paris put together, and their range in price and luxury encompasses the diverse range of budgets of the guests who book them.

In 1981, the New York Convention & Visitors Bureau clocked in 17 million visitors, a drop of 100,000 from the 17.1 million visitors in 1980, the city's second best travel year. Spending also slipped slightly and proportionately, to $2.1 billion last year compared to $2.2 billion in 1980. But any city-wide industry that can generate a gross cash flow of $2 billion in a slightly off year has to be rated in a reasonably good state of health, even for the Big Apple.

Incidentally, while New York State's tourism officials are quietly observing the anniversary of their "I Love New York" campaign, this is the 10th anniversary of the adoption of the "Big Apple" title for New York City. It was the brainchild of Charles Gillett, president of the New York Convention & Visitor's Bureau, who borrowed it from jazz players in whose argot professional success had not been achieved until they had played "The Big Apple" -- meaning New York City. To musicians, playing the Big Apple was comparable to the pinnacle of success that old-time vaudeville actors achieved by "playing the Palace." But it had to be the Palace Theater on Times Square in New York.

The theatrical references are most appropriate to any consideration of New York City's tourism because the legitimate theater is one of the major attractions of the metropolis, not only to American and Canadian English-speaking visitors but also to Europeans and, to a lesser degree, South Americans, Australians and Asians.

At this writing, today's newspapers listed 34 legitimate plays and musical comedies in the top Broadway area theaters, with 24 others in the off-Broadway category. At least another 100 theaters, diminishing in size but not necessarily in enterprise and enthusiasm as they become more distant from Times Square, are functioning in hotels, churches, school halls and community centers throughout New York in the Off-Off-Off-Broadway category.

The theater accounts for a big chunk of the tourism income. According to Harvey Sabinson, director of special projects for the League of New York Theatres and Producers, the 1980-1 theater season attracted 11 million patrons who spent $197 million for their tickets. He estimates the 1981-82 season will probably be off by about 100,000 ticket holders, reflecting the decline in total visitors to New York last year.

The league has been instrumental in providing Broadway talent for the commercials and print advertisements New York State uses in its "I Love New York" campaign, and Sabinson noted a correlation between theater attendance and revenues and the campaign: In the 1976-77 season, before the campaign got underway, theater audiences totaled 8.8 million and paid $93 million in admissions.

The league conducted a survey through questionnaires in six languages distributed at actual performances last summer. It revealed that summer audiences in Broadway theaters reflected the summer peak of tourism in the city. Fifty-three percent of the total audience lived in the greater New York metropolitan area, including New Jersey and southern New York State. Forty-seven percent said they were visitors, living beyond the 50-mile metropolitan area; 11 percent came from outside the United States, while only 9 percent actually lived in Manhattan. The top 10 city sources for theater audiences were, in descending order, Los Angeles, San Francisco, Boston, Miami, Chicago, Washington, Houston, Detroit, Philadelphia and Dallas.

Homelands of the foreign audiences were led by Canada, 18.8 percent; Great Britain, 8.5; Israel, 6.3; Italy, 5.1; Japan, 4.7; Venezuela, 4.2; Germany, 3.7; France, 3.4; Puerto Rico, West Indies, 3.2; Mexico, 2.6. The list bottomed out with India at .7 percent, and Saudia Arabia and Taiwan at .6 percent each.

The high percentages of theatergoers from so many foreign countries also reflects the views of New York City's tourism held both by the United States Travel and Tourism Administration and the one agency that has a firm grip on the pulse of local tourism, the Port of New York and New Jersey Authority. The USTTA lists New York City as the No. 1 goal of most foreign tourists, noting that the city also is the main port of entry for most foreign visitors.

The Port Authority's records show that more than 90 domestic and international airlines operate more than 10,000 domestic and overseas flights a week at Kennedy, LaGuardia and Newark Airports, including two shuttle links with Washington. Air transportation, according to Port Authority statistics, employes 160,000 people in the New York metropolitan area in one capacity or another, of whom about 50,000 work at the three Port Authority airports. Since it is generally estimated that pleasure travelers constitute slightly more than 30 percent of New York's total visitors, and that after hours many of the remaining 70 percent of business and convention visitors indulge in the recreational pleasures of the city, Mayor Koch's enthusiasm for tourists is financially well founded.

Serious efforts are being made to improve conditions here for visitors, ranging from beefing up police patrols on the mid-town streets frequented by visitors, and also in the subways, to long-term plans for recapturing Times Square from the shabbiness that overtook it after it became overrun by porno-flick movie houses and shoddy shops and their hangers-on.

At a recent press conference about his city budget, Mayor Koch announced that he had scraped together enough money to put on 1,500 additional New York City policemen and 500 new men for the Transit Authority police who work the subway system. These new uniformed patrolmen should become visible on the city streets and beneath them, beginning this spring.

On the long-discussed rejuvenation of Times Square, city officials are now awaiting bids from several major developers offering designs and funding plans for closing off several blocks of Broadway through Times Square, constructing a pedestrian mall and restoring the once legitimate theaters along 42nd Street to their former glory. It may be several months before these plans are completed and many more before visitors will begin to notice improvement.

First signs of construction of the 50-story, 2,200-room hotel that John Portman, the Atlanta architect and developer, is planning for the west side of Times Square between 45th and 46th streets became evident last month. After resolution of part of the court actions that had delayed the project, demolition actually was begun to prepare the site. The old Bijou Theater on 45th Street has already disappeared as have several small buildings. Fate of the Helen Hayes Theater on West 45th and the Morosco Theater on West 46th is still tied up in a federal court suit brought by environmentalists and some theatrical people who want to save the two old houses. The Portman project would replace them with at least one new theater built into the hotel complex.

All this political and economic activity has caused tourism industry leaders to anticipate a slightly better 1982 than they had foreseen a few months back. The recession, and the opening up of 6,000 additional new hotel rooms in Manhattan in the summer of 1981, hit the tourism trade here right on the head, and the explosion of rate reductions and cut-rate packages offered by all categories of hotels last summer indicated the seriousness of that situation and an attempt to fight back.

Anne Picker, director of Business Research at Pannel Kerr Forster, a leading accounting firm specializing in hotels and tourism, noted that last summer's slump led to a new aggressive marketing and a new sense of competition among hoteliers, who rolled up their sleeves and began working hard to develop new markets. Much of this was in the business travel sector, fighting for the airline business involving rooms for flight crews, a surprisingly strong part of the business picture. Corporations that had abandoned hotel suites and long-term bookings in favor of condominium apartments on the fashionable East Side of Uptown, were enticed back into hotels by rate cuts, Picker reported.

Pleasure travelers also benefited from reduced-tariff packages, but the discounting came to an end in September when the annual fall pickup returned with full houses for the normally good autumn months, September, October and November. Reduced-rate packages came back as usual for the December-January soft spots, continuing into mid-January.

For the months ahead, Picker predicts a slight softening of tourism here, perhaps a 3 percent decline in hotel occupancy for the city as a whole. The chairman of the board of a major advertising agency that handles a great deal of important hotel business is slightly more optimistic, hedging his bets against whatever happens to the nation's economy in the next six months.

Albert A. Formicola, president of the Hotel Association of New York City, is more optimistic, noting that the slight decline in 1981 from the nearly 80 percent hotel occupancy rate of 1980 to 74 percent last year reflected a comparison with one of the very best years New York City's hotels ever had experienced. The availability of the new rooms will benefit the entire city and industry, he said. He expects room rates "to remain steady for the foreseeable future," with no increases or decreases anticipated. This, Formicola believes, with the continued improvement of New York's image, gives promise for a good year for the city's tourism industry "and a warm welcome and good time for the visitors."

The New York Convention & Visitors Bureau offers visitors a great deal of information and help in searching out all the pleasures of visiting New York. Its office at Two Columbus Circle, New York 10019, telephone (212) 397-8200, stands midway between the Broadway theaters and Times Square, and Lincoln Center, where Broadway and Eighth Avenue meet, on the edge of Central Park and West 59th Street, and its supply of brochures and information about what is going on in the city is seemingly unlimited. Its "The Big Apple Guide" is a source book of all the arts, music, theatrical and cultural activities in town, plus the major sightseeing attractions and how to get to them, hotel and restaurant listings, and many other bits of useful information the visitor wants to know but normally has a hard time finding.

Such a guidebook is especially helpful for those to whom the geography of Manhattan is a mystery. Yes, according to the music of Leonard Bernstein for "On the Town," the Bronx is up and the Battery is down, but contrary to many romantic writers, New York is not a collection of many little separate villages. It is, rather, a collection within each of the five boroughs of many communities whose distinctions often fade or segue softly into one another without definite frontiers.

Some are distinct, or more visible, because of their ethnicity (Little Italy, Chinatown, Harlem); some because of their architecture and geography (Brooklyn Heights with its brownstones, for example, and its views of the Upper Bay and the Statue of Liberty); some for their poverty and ghettos; some, like the upper West Side, are known for middle-income older-apartment-house bourgeoisie, and some, like the currently fashionable upper East Side, for condominiums and upper-income newer-building chic.

Although I have tried assiduously, I have been able to find little if any more chic walking the sidewalks of the upper East Side than those of the upper West Side. It does show in the price of the apartments but that need not seriously concern the visitor to New York.