In enlish there is a clear distinction between a number of elements and quantity.
elements: There are still so many things to do.
quantity: Never before have older people had so much money.
In Portuguese as well as in the other roman languages, actually in most languages, that's why a lot of English learners have problems with this distinction, the same adverb is used in both cases. To describe a mass one uses the adverb in singular and to describe elements the plural of these adverbs. See examples below.
Tanto / tanta / tantos / tantas as well as so many, so much can be used to compare amount of elements / quantities as well as to describe a great number of elements / a big amount of someting. Used to express a big number of element / ab big quantity it is so many / so much. In comparisons it is as many / much as.
describing a big amount of elements: So many words are used to say nothing.
describing a big quantity: I still have so much work to to.
comparing to amounts of elements: There were not nearly as many people in the street as before.
comparing to quantities: She earns as much as he does.
The use of the adverb so is actually a little bit unclear and we can leave it out. There is no difference between "So many words..." and "Many words...". However the so much always suggests that the speaker / writer is comparing the amount to something. (We don't need much food. <=> We don't need so much food.)
It is to assume that the adverb so steems from a comparison, in other germanic languages, for instance german, it still exists and is used in comparisons, but in English the construction has changed in the course of history and the so is hanging in the air nowadays. In Portuguese there is no difference between describing a big number of elements / a big amout of something and a comparison, what is strange as well. Tanto / tanta / tandos / tantas used to describe a big number of elements / a big amount can be substituted by muito / muita / muitos / muitas, see 28.5. It is to assume that tanto / tanta / tantos / tantas was originally used to compare to quantities, but that afterwards there was a shift of meaning.
So much and so many can be used in English as well to describe a quantity that the speaker / writer considers as excessive. Tanto / tanta / tantos / tantas cannot be used in this context. In this context we use demasiado / demasiada / demasiados / demasiadas.
O ar é opressivo, com o cheiro de demasiada gente num espaço reduzido.
The air is stuffy, with the smell of too / so much people in a small room.
Furthermore tanto / tanta / tantas / tantos can never, in opposite to too much / too many, be used as an adverb. Only demasiado can be used as an adverb.
He works too much.
noun: Much has been written about the topic.
adjective: Many people have no goals.
tanto used to reference elements of a group
Não imaginava que houvesse tanta gente*.
I didn't expect that so many people will come.
Sinto muito ter-lhes causado tantos problemas.
I regret having you caused so much trouble.
* It is a little bit hard to understand, but people is singular in Portuguese. (The reason for this ist that it steems from latin gens, tribe, and this is singular.)
tanto in singular so much, such a lot of
Não precisava comprar tanta comida.
It was not necessary to buy so much food.
Eu não bebo tanta cerveja.
I don't drink so much beer.
Tanto / as much as - as many as can be used as well to compare one amount with another amount. The comparison article is como or quanto. Como and quanto are synonyms in this context.
tanto como tanto quanto
Detesto matemática tanto quanto detesto francês.
Detesto matemática tanto como detesto francês.
It hate mathematics as much as French.
The amount can be compared with an adverb (for instance agora), a ponoun (for instance eles) or a noun (for instance metade).
tanto ... como in comparisons
Nunca houve tanto dinheiro em contas à ordem como agora.
Never before so much money has been hold on current accounts as today.
Ninguém ganha tanto dinheiro como eles.
Nobody earns so much money as they do.
Oito mais ricos têm tanto dinheiro como metade dos mais pobres.
The eight richest have as much as half of the poorest.
Ela é inteligente tanto quanto ele.
She is as intelligent as she.
Gosto de ir ao cinema tanto quanto gosto de ir ao teatro.
I like as much to go to the cinema as to the theater.
Tanto... como and tanto...quanto corresponds to as well as in English. There is no difference in meaning between tanto...como and tanto...quanto.
tanto ...como / tanto ...quanto
Tanto João como José participaram do debate.
(Participaram do debate tanto João como José.)
João as well as José participated in the discussion.
If the word order is changed, tanto...quando becomes tanto quanto.
tanto quanto as
Você está metida nisso tanto quanto eu.
(Tanto você quanto eu está metido nisso.)
You are involved in this issue as I do.
So many, so many things, so much.
So many have a car.
=> Big number of homogenous elements.
=> translation with tantos. (is inflected)
So many things doesn't work.
=> Big number of heterogenous elements.
=> translation with tantas coisas. (is not inflected)
I don't want so much.
=> Homogenous part of a quantity.
=> translation with tanto.(is not inflected)
So much can be translated with tantas coisas or tanta coisa. The meaning is the same.
so much tantas coisas / tanta coisa
Há tantas coisas que não são, como debem ser.
There are so many things that are not like they should be.
Tem* tanta coisa que eu não sei.
There are so many things I don't know.
*tem (infinitive ter = to have) is used here as a substitute for há (infinitiv haber = to have) whose meaning was originally to have as well, but has lost its original meaning in the course of history and is only used as an auxiliary verb today. We need it to form the compound tenses. However in the sense of there is ("it has") it survived in the original meaning. In Portuguese however it is possible to substitute há by tem.
So much refers to a part of a quantity. In this case the translation is simply with tanto. So many is translated with tantos / tantas.
tanto so much
Não fumes tanto!
Don't smoke so much!
Falou tanto na reunião que ficou rouco.
He talked so much at the conference that he got hoarse.
tantos / tantas so many
Tantos são preguiçosos.
So many are lazy.
Tanto quanto can be part of an adverbial as well. The translation is as in this case.
tanto as an adverb
Isso importa para mim tanto quanto importa para você.
This is as important for me as for you.
The amount can be described as well with a relative clause.
With a relative clause the amount can be described.
Há tantas coisas que não entendo.
There are so many things I don't understand.
Agora tenho tanto dinheiro que não sei o que fazer com ele.
No I have so much money, that I don't know what to do with it.