Researchers in the International Human Genome Sequencing Consortium published the finished, gap-filled sequence in 2004 and revised the count: roughly 20,000 to 25,000 protein-coding genes, a small fraction of the original estimate.
That number put humans in roughly the same range as the roundworm Caenorhabditis elegans, a millimeter-long worm with about 1,000 cells total, and not far ahead of the fruit fly. Complexity, it turned out, did not come from having more genes than simpler animals.
The surprise pushed research toward how genes are used rather than how many exist: a single human gene can be spliced into many different proteins, and regulatory DNA switches genes on and off in different tissues and times, multiplying what a modest gene count can produce. Counting genes, it turned out, was the easy part; working out what they all do is the project that followed.

Read the original study
International Human Genome Sequencing Consortium, Nature, 2004 · doi.org/10.1038/nature03001
Fewer genes than expected, far more uses for them.
Source
- International Human Genome Sequencing Consortium (2004). Finishing the euchromatic sequence of the human genome. Nature, 431(7011), 931–45. https://doi.org/10.1038/nature03001