You mean with regard to the 22nd Amendment? An "accidental" term counts as the first term if it has lasted for more than 2 years. Which means Truman's would have counted (though it actually doesn't because the Amendment was ratified after the fact), but Johnson's wouldn't.
Just in general, not with regard to the Second Amendment.
I consider their time as President prior to being elected to be their first term. Some of their major accomplishments were accomplished within the period prior to to their own election as President. I look at the election of an "accidental" President as being different from a typical election, in that, if the public elects the sitting accidental President, they are more affirming that this is their President, this is who the public wants to continue for at least the next four years.
If an accidental President's first term cannot be counted as such, then how can we say Gerald Ford (who was neither elected Vice President nor affirmed as President) was actually President and served a term?
That is why I tend to call Truman and Johnson's elected terms their second terms. The public wanted them to continue....