Does nontaxable short disability payments that appear in box 12 code J on a W-2 (other boxes are blank) from an insurance company count as earnings for the earnings test? Also if in my last month of employment before going part time, I was on leave receiving sick pay, would that pay count towards the $1470 (2019) monthly limit?
According to the IRS website, entries in block 12 of a W-2 with the code you mention are classified as nontaxable sick pay. Therefore, my assumption is that the payment would not count for Social Security earnings test purposes, but I'm not 100% sure. However, if it's actually an insurance payment and not part of your remuneration from an employer, then then I'd say that it definitely would not count.
With regard to your other question about sick pay from your employer, sick pay almost always does count for earnings test purposes. If the sick pay is paid in lieu of wages during a period that you're still employed, the sick pay counts as earnings in the period of your absence from work. But, if the sick pay is paid after your employment relationship terminates, then it would normally count for purposes of the earnings test as being earned in the last month of your employment (https://secure.ssa.gov/apps10/poms.nsf/lnx/0302505030).