You can drop the track into SonicVisuliser get the beat count then export to
Script: ReaTrak sonic visualiser import bars or beats.lua
then
Script: ReaTrak set tempo mapped items in selection to constant tempo.lua
TonE made a good suggestion here
SonicAnnotator can be used within Reaper so it would do it with one button/script, so I will look into that.