The counting system for large numbers is almost the same as Western numbers, except that digits are delimited into blocks of four instead of three. You add "thousand, million, billion, trillion, ..." for each 3 digit, and in Japanese, we add "万, 億, 兆, 京【けい】, ..." for each 4 digit.
The "correct" format to write long numbers depends on the situation.
This is the most basic form based on the pronunciation, but too lengthy and less readable. This is on math textbooks for young students, but I think this is generally avoided after we graduate from junior high school.
It's almost like saying in English, "three trillion and four hundred seventy six billion and five hundred twenty one million and eight hundred ninety three thousand and four hundred twenty one". --- Can you understand this instantly?
三兆四七〇五億二一八〇万三四二一 (= 3,470,521,803,421)
Leave 4-digit grouping unit (万、億、兆、...) and omit 十、百、千. Use 漢数字ゼロ(〇) to represent zero. This preserves both readability and brevity, so this is the preferred style in newspapers. If you don't mind using some Arabic numbers and you are writing horizontally, you can do like this:
Actually this is the most understandable way (even easier than "3,476,521,893,421") for Japanese.
三四七〇五二一八〇三四二一 (= 3,470,521,803,421)
Simply replace Arabic numerals with kanji numerals (again, use 〇 for zero). This is typically used for phone numbers, address, etc., but less readable for generic big integers.