I have been searching around, but all the sources give completely different answers ranging from 2,000 to 50,000. So my question is how many Kanji characters that have ever existed since the dawn of time? Does this include unofficial characters?
An authoritative classic, the Kāngxī dictionary, lists over 47,000 characters. The Hanyu Da Zidian, a more modern reference, has over 54,000 characters; the Dai Kan-Wa Jiten, the Japanese equivalent, has over 50,000. Even more recently, the Zhōnghuá Zìhǎi has over 85,000 characters, but apparently many of those are variants.
Of course, such counting is more-or-less academic. In Japan, there are only 2,136 Jōyō kanji (lit. commonly-used kanji), which are the ones taught in school, though literate people usually know more. The equivalent list in Chinese is the Xiàndài Hànyǔ Chángyòng Zìbiǎo, which has about 3,500 characters.
I feel like this question is lacking a super detailed answer, so I'm going to give an excruciatingly detailed breakdown of various kanji thresholds.
1,500ish: This is probably the range of kanji that the average person remembers how to actually handwrite directly from memory.
2,136: This is the number of jouyou kanji. These are the kanji that are required to be taught in compulsory education (elementary and middle school, which goes through 9th grade in Japan). This list is followed closely by government documents, and most newspapers also will restrict themselves to these, but it isn't closely followed by anything else.
2,999: This is the number that includes the jinmeiyou kanji. These are the kanji legally allowed to be used in names, in additional to the jouyou kanji. There are 863 kanji on this, which brings the total to 2,999. Despite the primary use (and 人名用 literally meaning "for use in names"), not every kanji on the list is exclusively on it for its use in names. For example, 臭 is on the list, and no one in their right mind would give a kanji for "stench" as the name of a child (and as far surname websites can tell me, no one has it as a family name either). Rather, 212 of the kanji are just the traditional form of the jouyou kanji that were simplified after ww2.
3,500~4,000: This is about the number of kanji a normal Japanese person can read within the context of a word. I can only find guesses of this, since I can't find a study that covers the number.
6,300ish: We have two major thresholds. First, this is the number of kanji tested that the highest level of the kanji kentei. This is far beyond what most Japanese people can do, and is mainly gotten to look good on ones resume, but someone who really likes kanji may also consider it.
Also at this level is the number of kanji encoded levels 1 and 2 of JIS X 0213 encoding standards (6,355). This was all you could reliably expect a generic computer system in the '80s to support. The kanji on both closely match, though there are differences. There are kanji on the level 1 kanken exam which are at a higher level of JIS encoding, and over a hundred kanji in the JIS levels aren't included due to being only in very rare place names, or in some cases, not in anything at all (the 幽霊漢字). Basically, when created back in the '70s, there were a few kanji that were surely mistakes/misprints that were included into the standard. They obviously had to be continued to be supported in later updates, even though use of them is very dubious.
6,715: This is the number of kanji when you include IBM select characters which was included with DOS and the early versions of Windows. These were included to maintain support with older systems that included those kanji. Not all systems would support these in the '80s/'90s, but some did. The only use of these kanji I've ever seen is in names, either because the name existed before Japan started enforcing the Jinmeiyou kanji, because they are Chinese/Korean and are keeping their kanji from there, or just as something that isn't their legal name, but that they personally use anyways.
10,134: This is the number of kanji in the latest JIS standard (JIS X 0213), plus the 84 from the IBM select characters that weren't included in the standard so we keep our set increasing.
13,322: This is the number of kanji in JIS X 0213 combined with the old supplemental standard in JIS X 0212, plus the remaining 34 kanji in IBM select that was in neither. This is basically the number of kanji that were part of a "major" JIS version.
14,664 - This is the number of kanji supported by Adobe-Japan1-7, the de facto standard Japanese font specification. The extra stuff here from beyond the last mentioned one is pulled from a wide variety of sources. This is basically the limit as far as Japanese kanji goes.
The two ways to increase from here is if we wish to extend to the number of Japanese characters in general or from the number of han characters in general. Since the latter is already covered in the other answers (over 100,000), we will go with a final number of Japanese characters of around 15 thousand characters, adding in hiragana, katakana (including the ones used specifically for Ainu), hentaigana, and bonji.
50,000 is usually the number given for the number of Kanji characters since the dawn of time.
2,000 is roughly the number than comprises compulsory education.
5,000 is often assigned to particularly well-read persons (e.g. university professors).
I remember reading a newspaper article about one of these "living national treasures", who was supposedly able to read 10,000 characters. (I have yet to find a reference.) One does have to wonder, however, how they determined the number.