You know when writing translations of other songs, you need to know the number of syllables on each line, but the question is how do I do that? Are there good tools on the Internet that does this? I was specifically looking to translate a Japanese song into English while preserving as much of the meaning as possible, but I am not sure how to go about counting the syllables on each line. There are tools in English, but for other languages I am wondering if there's a way to do this easily.
Currently, automatic linguistic processing is not as advanced as that of a fluent human. There are no tools, online or offline, that can count syllables (or morae, see below) reliably.
When it comes to Japanese lyric rhythm, what you are interested in are not syllables but morae. You will need to be fluent in Japanese to recognize them.
Rendering both meaning and metre of Japanese poetry in English is near impossible. Skilled translators, fluent in both languages, struggle with this.
These are the steps that I believe are necessary to translate Japanese poetry:
Yes, I know that you think you know English, but your level of mastery of your mother tongue needs to be raised to near perfection.
You need a native's understanding of the unspoken implications of a word or sentence to grasp the full meaning of poetry.
Learn to write poetry
To translate poetry, you must be a master poet in the target language.
Translating poetry is a lifelong endeavour.
“Poetry is what gets lost in translation.” ~ Robert Frost