What is the source of the count of 40000 denominations, and how are they classified? It is often said that there are up to 40 thousand Christian denominations.

What is the original source of this claim, and how are the denominations classified?
The 40,000 figure comes from a chart that is quoted by the "Best Estimates" web site, the estimation comes from the a chart that is linked below originally provided by Gordon Conwell Edu.   It is an estimation of where things stand now in Christianity world wide.    This figure is actually off now, and has been surpassed as time has passed.   If you go to line 41 of the original chart the figure should now be over 45,000 separate denominations, and should grow to 55K by 2025!  

https://www.gordonconwell.edu/wp-content/uploads/sites/13/2019/04/StatusofGlobalChristianity20191.pdf