How many basic types of beans are there
There are hundreds of different bean cultivars. Some countries sell predominantly 2-3 types of bean in the supermarket, but which type is sold varies from country to country. If you are eating beans from a farmer's market, all bets are off.
How do you distinguish them
There are reference books for agriculturists and system biologists which contain detailed descriptions and pictures of different plant cultivars for a species. You could try finding a reference work for beans and looking them up there, but many cultivars look very much alike, and with only the seeds available, even the experts are likely to have a high error quote. Trying to do such a recognition requires lots of effort, has a low success rate, and serves no good purpose in the kitchen.
Do they differ a lot nutritionally
It is hard to say, as the difference between closely related cultivars will be larger than the difference between less related ones. But if you are thinking that you can get a single calorie count per cultivar, forget it.
Sources state nutritional info based on a measurement they have made, and it is hopefully the average of many measurements made. But unprocessed foods vary a lot between batches. Did the bean grow in the sun or in the shade? What was the soil composition, how much fertilizer did it get, how much water and sun? How ripe is it? How much time has gone since it was picked? Water evaporates and vitamins get destroyed over time. Both the calorie content and the ratio of nutrients will vary considerably between exemplars of beans (or melons, or fish, or whatever natural food).
If you have found calorie counts which are a lot different from each other (say one is 3-4 times higher) then this is probably a difference in the state of the food and not between cultivars. It is possible that the 22 calories are for fresh beans or cooked beans and higher counts are for dried raw beans. Or with beans, it could even have been a number for green beans (picked unripe). Also, sometimes calorie databases contain mistakes, I have seen the same database give a higher calorie number per ounce of hazelnuts than per 100 gram of hazelnuts. But if the difference is not so much (up to 100% maybe), I'd assume that it is more of a matter of variance between batches.