Somebody did because nowhere in the world will you find a list of these 40,000 denominations.
The claim of 30,000 denominations that has grown ever larger was based on a guy whose definition of denomination involved who has authority for discipline or decisions in a church. In a Baptist church, that is ALWAYS the individual congregation. Each congregation decides if it will have a doctrinal statement, what the statement contains if it has one, who the pastor is, who the deacons are, etc. Logically then, the Southern Baptist Convention by itself would have over 40,000 ‘denominations’ - the vast majority of whom agree with a single doctrinal statement.
If a denomination is a group of churches which are largely in agreement on doctrine, then ‘baptist’ would cover most baptist denominations as one - SBC, American Baptist, etc. It all depends on definitions.